Java 基本型別 Primitive Data Types 種類
boolean
true / false
false
X
public class UsingBoolean { public static void main(String[] args) { boolean test = false; System.out.println("布林變數 test 的值:" + test); test = true; System.out.println("布林變數 test 的值:" + test); } }
布林變數 test 的值:false 布林變數 test 的值:true
【 M@nGo 留言區 】 如有任何建議的地方,請前往芒果留言區留言。
最后更新于2年前