多选题Which of the following statements are legal?()Along l = 4990;Bint i = 4L;Cfloat f = 1.1;Ddouble d = 34.4;Edouble t = 0.9F;

多选题
Which of the following statements are legal?()
A

long l = 4990;

B

int i = 4L;

C

float f = 1.1;

D

double d = 34.4;

E

double t = 0.9F;


参考解析

解析: 此题的考点是数字的表示法和基本数据类型的类型自动转换,没有小数点的数字被认为是int型数,带有小数点的数被认为是double型的数,其它的使用在数字后面加一个字母表示数据类型,加l或者L是long型,加d或者D是double,加f或者F是float,可以将低精度的数字赋值给高精度的变量,反之则需要进行强制类型转换,例如将int,short,byte赋值给long型时不需要显式的类型转换,反之,将long型数赋值给byte,short,int型时需要强制转换(int a=(int)123L;)。

相关考题:

下面各选项中正确的是( )。 Ⅰ:long l=4990 Ⅱ:int i=4L Ⅲ:float f=1.1 Ⅳ:double d=34A.Ⅱ、ⅢB.Ⅱ、Ⅲ、ⅣC.Ⅰ、ⅣD.Ⅲ、Ⅳ

Which of the following statements is NOT used by the speaker to perform. certain acts A “I name this ship Elizabeth.’’B “I visited my uncle last Sunday.’’C “I give and bequeath my watch to my brother.’’D “I bet you sit pence it will rain tomorrow.’’

Whichofthefollowingstatementsarelegal?() A.longl=4990;B.inti=4L;C.floatf=1.1;D.doubled=34.4;E.doublet=0.9F;

下面各选项中正确的是( )。 Ⅰ: long 1 = 4990 Ⅱ: int i = 4L Ⅲ: float f=1.1 Ⅳ: double d=4A.Ⅱ、ⅢB.Ⅱ、Ⅲ、ⅣC.Ⅰ、ⅣD.Ⅲ、 Ⅳ

下面各项声明中合法的是( )。 Ⅰ:long1=4990; Ⅱ:int i=4L; Ⅲ:floatf=1.1; Ⅳ:double d=34;A.Ⅱ、ⅢB.Ⅱ、Ⅲ、ⅣC.Ⅰ、ⅣD.Ⅲ、Ⅳ

Which of the following statements is NOT true?()AElizabeth I broke Mary.s ties with Rome.BElizabeth I restored her father.s independent Church of England.CElizabeth I.s religious reform was a compromise of views.DElizabeth I.s religious settlement was acceptable to both extreme

Which of the following statements is NOT true?()AAlfred the Great started the English navy.BAlfred the Great reorganized the Saxon any,making it more efficient.CAlfred the Great established schools and formulated a legal System.DAlfred the Great impose a tax,called the Danegeld,on the Saxons.

Which of the following statements is NOT true?()A、Elizabeth I broke Mary.s ties with Rome.B、Elizabeth I restored her father.s independent Church of England.C、Elizabeth I.s religious reform was a compromise of views.D、Elizabeth I.s religious settlement was acceptable to both extreme

Which of the following statements is NOT true?()A、Alfred the Great started the English navy.B、Alfred the Great reorganized the Saxon any,making it more efficient.C、Alfred the Great established schools and formulated a legal System.D、Alfred the Great impose a tax,called the Danegeld,on the Saxons.

Which of the following encryption methods is often used along with L2TP?()A、S/MIMEB、SSHC、3DESD、IPSec

Consider the following class:     class Test(int i) {     void test(int i) {  System.out.println(“I am an int.”); }    void test(String s) {   System.out.println(“I am a string.”);     }          public static void main(String args) {    Test t=new Test();     char ch=“y”;    t.test(ch);     }      }     Which of the statements below is true?()A、 Line 5 will not compile, because void methods cannot be overridden.B、 Line 12 will not compile, because there is no version of test() that rakes a charargument.C、 The code will compile but will throw an exception at line 12.D、 The code will compile and produce the following output: I am an int.E、 The code will compile and produce the following output: I am a String.

Which of the following statements are legal?()         A、 long l = 4990;B、 int i = 4L;C、 float f = 1.1;D、 double d = 34.4;E、 double t = 0.9F;

Which of the following is the technology that helps organizations to reduce legal risks associated with e-mail?()A、Information Rights ManagementB、JoumalingC、Legal disclaimerD、Messaging Records Management

多选题If p and q are primes greater than 2, which of the following statements must be true? (Indicate all such statements.)Ap + q is evenBpq is oddCp2-q2 is even

多选题Concerning the figure below, if a =b, which of the following statements must be true? (Indicate all such statements.)Ac=dBl and k are parallelCm and l are perpendicular

多选题Which two are valid declarations of a float?()Afloat f = 1F;Bfloat f = 1.0.;Cfloat f = ‘1’;Dfloat f = “1”;Efloat f = 1.0d;

多选题Which of the following statements are true? (Indicate all such statements.)Aτ(5) =τ(7)Bτ(5) τ(7) =τ(35)Cτ(5) + τ(7) =τ(12)

多选题在Java中,下列()是合法的声明。Afloat f=1/3;Bint i=1/3;Cfloat f=1.01;Ddouble d=999d;

单选题以下定义语句中正确的是(  )。Afloat a=1,*b=a,*c=b;Bint a=b=0;Cchar A=65+1,b='b';Ddouble a=0.0;b=1.1;

单选题Which of the following statements is NOT true?()AAlfred the Great started the English navy.BAlfred the Great reorganized the Saxon any,making it more efficient.CAlfred the Great established schools and formulated a legal System.DAlfred the Great impose a tax,called the Danegeld,on the Saxons.

单选题下面语句正确的是()。Achar=’abc’;Blong l=oxfff;Cfloat f=0.23;Ddouble d=0.7E-3;

多选题Given:  Integer i = new Integer (42);  Long l = new Long (42);  Double d = new Double (42.0);   Which two expression evaluate to true?()A(i = = l)B(i = = d)C(d = = l)D(i.equals(d))E(i.equals(i))F(i.equals(42))

多选题Which the three are valid declarations of a float?()Afloat foo = -1;Bfloat foo = 1.0;Cfloat foo = 42el:Dfloat foo = 2.02f:Efloat foo = 3.03d:

多选题Which of the following statements are legal?()Along l = 4990;Bint i = 4L;Cfloat f = 1.1;Ddouble d = 34.4;Edouble t = 0.9F;

单选题如果已经定义了方法int f(bool b, int i),则以下方法中,哪一个不是合法的重载方法()。Adouble f(bool b, int i)Bint f(double d, int i)Cint f(bool b,int i, double d)Ddouble f(bool d, int j)

单选题高胆红素血症:()A5.13~18.8μmol/l(0.3~1.1mg/dl)B18.8~34.4μmol/l(1.1~2mg/dl)C>34.4μmol/l(>2mg/dl)D>18.8μmol/l(1.1mg/dl)E>5.13μmol/l(0.3mg/dl)

单选题Which of the following sets of English sounds differs only in one distinctive feature? _____A[v][e][i:][ð]B[f][z][æ][i]C[i:][i][e][æ]D[p][i][e][s]

( 难度:中等)下面的哪些声明是合法的?( )A.long l = 499B.int i = 4LC.float f =1.1D.double d = 34.4E.String = ""