文档详情

java大学教程ppt JAVA的基本语法.ppt

发布:2018-04-17约小于1千字共4页下载文档
文本预览下载声明
第二讲 JAVA的基本语法 Quiz 1 第二讲 JAVA的基本语法 Quiz 2 第二讲 JAVA的基本语法 Quiz 3 What are the data types of the following expressions, assuming that is type is int? 第二讲 JAVA的基本语法 Quiz 4 * byte a = 7; byte b = a + 1; possible loss of precision found : int required: byte byte b = a + 1; ^ 1 error byte a = 7; byte b = (byte)(a + 1); int a = 7; int b = a + 1; int a = 5; int b = 3; int c = ab?5:6.8; int a = 5; int b = 3; double c = ab?5:6.8; float f = 5.2; … … possible loss of precision found : double required: float float f = 5.2; ^ 1 error i 0 i = 0 i++ (float)i i == 0 aString + i [boolean] [int] [int] [float] [boolean] [String] int i = 56; int j = 56 ~1; *
显示全部
相似文档