Which statement is/are true?
I. Default constructor only contains "super();" call.
II. We can't use any access modifier with a constructor.
III. A constructor should not have a return type.
A. Only ...
Which code fragment cause a compilation error?
A.
float flt = 100F;
B.
float flt = (float) 1_11.00;
C.
float flt = 100;
D.
double y1 = 203.22;
float flt = y1
E.
int y2 = 100;
float flt = (float) y2;
Which is true about the above statement?
A. The value of the variable number will be 808.1
B. The value of the variable number will be 808
C. The value of the variable number will be 0.
D. A NumberFo...
Which statement will empty the contents of a StringBuilder variable named sb?
A. sb.deleteAll();
B. sb.delete(0, sb.size());
C. sb.delete(0, sb.length());
D. sb.removeAll();
Which of the following exception will be thrown due to the statement given here?
int array[] = new int[-2];
A. NullPointerException
B. NegativeArraySizeException
C. ArrayIndexOutOfBoundsException
D....