dell_compu
July 13th, 2000, 06:25 PM
This is the Question I came across in Java2 Exam:
Which statement declares a variable a which is suitable for referring to an array of 50 strings objects?
A.char a[][];
B.String a[];
C.String []a;
D.Object a[50];
E.String a[50];
F. Object a[];
It is given somewhere that B,C,F are correct.Why not E correct because we can declare and initialize at the same time....why F is correct?is it because String extends Object??
will anyone give me the correct answer for this question? will u please explain me in detail....
Thanks,
dd
Which statement declares a variable a which is suitable for referring to an array of 50 strings objects?
A.char a[][];
B.String a[];
C.String []a;
D.Object a[50];
E.String a[50];
F. Object a[];
It is given somewhere that B,C,F are correct.Why not E correct because we can declare and initialize at the same time....why F is correct?is it because String extends Object??
will anyone give me the correct answer for this question? will u please explain me in detail....
Thanks,
dd