?? testcompileconstant.java
字號:
/**
* Description:
* <br/>Copyright (C), 2008-2010, Yeeku.H.Lee
* <br/>This program is protected by copyright laws.
* <br/>Program Name:
* <br/>Date:
* @author Yeeku.H.Lee kongyeeku@163.com
* @version 1.0
*/
class MyTest
{
static
{
System.out.println("靜態(tài)初始化塊...");
}
//使用一個字符串直接量為static final屬性賦值
static final String comileConstant =
"Struts2權(quán)威指南";
// //采用系統(tǒng)當前時間為static final屬性賦值
// static final String comileConstant =
// System.currentTimeMillis() + "";
}
public class TestCompileConstant
{
public static void main(String[] args)
{
//訪問、輸出MyTest中的comileConstant屬性
System.out.println(MyTest.comileConstant);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -