publicclassWow{publicstaticvoidgo(shortn){System.out.println(”short”);}publicstaticvoidgo(Shortn){System.out.println(”SHORT”);}publicstaticvoidgo(Longn){System.out.println(”LONG”);}publicstaticvoidmain(String[]args){Shorty=6;intz=7;go(y);go(z);}}Whatistheresult?()
A.shortLONG
B.SHORTLONG
C.Compilationfails.
D.Anexceptionisthrownatruntime.
第1题:
自动类型转换规定的优先次序是( )。
A.short,byte,char→long→int→float→double
B.short,byte,char→int→long―float→double
C.byte,short,char→long→int→float→double
D.byte,short,char→int→long→float→double
第2题:
A.byte, short, int, long, float, double
B.boolean, byte, short, char, int, long, float, double
C.byte, short, char, int, long, float, double
D.byte, short, char
E.int, long, float, double
第3题:
【单选题】Java语言中数值数据的类型能自动转换,按照从左到右的转换次序为
A.byte→int→short→long→float→double
B.byte→short→int→long→float→double
C.byte→short→int→float→long→double
D.short→byte→int→long→float→double
第4题:
自动类型转换是按优先关系从低级数据转换成高级数据,规定的优先次序是( )。
A.byte,short,char→int→long→float→double
B.float→int→long→byte,short,char→double
C.int→long→float→double←byte,short,char
D.double→int→folat→long→byte,short,char
第5题:
10、Java语言中数值数据的类型能自动转换,按照从左到右的转换次序为 ()
A.byte→int→short→long→float→double
B.byte→short→int→long→float→double
C.byte→short→int→float→long→double
D.short→byte→int→long→float→double