• 2022-07-24
    指出正确的表达式()
    A: byte $_*5=126;
    B: boolean=false;
    C: long l=0xfffL;
    D: double=0.9239d;
  • C

    内容

    • 0

      对于“switch(a)”表达式中的变量a,它可以被声明为哪些合法数据类型? A: boolean, byte, char, short, int, long B: boolean, byte, char, short, int C: byte, char, short, int D: boolean, byte, char, short, int, long, float, double

    • 1

      Java定义了八种基本数据类型,以下选项中全部是正确的基本数据类型关键字的是( )。 A: int、byte、char、integer、double B: float、long、byte、short、String C: char、byte、bit、double、int D: float、double、boolean、byte、long

    • 2

      Java表达式“5 <= 5”,该表达式结果的数据类型和值分别是( )。 A: int,0 B: int,true C: boolean,true D: boolean,false

    • 3

      指出下列类型转换中正确的是( ) A: int i=8.3; B: long L=8.4f; C: int i=(boolean)8.9; D: double d=100;

    • 4

      java中的整型数据是分正负的,它细分为byte,short,int,long,在内存中分别占1,2,4,8个字节 A: boolean a=true; B: boolean b=false; C: boolean c=0; D: boolean d=1;