?? testboolean.java
字號:
/**
* Description:
* <br/>Copyright (C), 2005-2008, 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
*/
public class TestBoolean
{
public static void main(String[] args)
{
boolean b1 = true;
boolean b2 = false;
//下面代碼將出現(xiàn)錯誤:字符串不能直接變成boolean型的值
//boolean b3 = "true";
//使用boolean和字符串進行連接運算,boolean會自動轉(zhuǎn)換成字符串
String str = true + "";
//下面將輸出true
System.out.println(str);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -