Copy link:
Copy

Which four options describe the correct default values for array elements of the types indicated?1) int -> 02) String -> "null"3) Dog -> null4) char -> '\u0000'5) float -> 0.0f6) boolean -> true
1, 2, 3, 4
1, 3, 4, 5
2, 4, 5, 6
3, 4, 5, 6

What is the range of data type short in Java?
-128 to 127
-32768 to 32767
-2147483648 to 2147483647
None of the mentioned

Which of the following are legal lines of Java code?1. int w = (int)888.8;2. byte x = (byte)100L;3. long y = (byte)100;4. byte z = (byte)100L;
1 and 2
2 and 3
3 and 4
All statements are correct.

What is the output of this program? class increment { public static void main(String args[]) { int g = 3; System.out.print(++g * 8); } }
25
24
32
33

Which one of these lists contains only Java programming language keywords?
class, if, void, long, Int, continue
goto, instanceof, native, finally, default, throws
try, virtual, throw, final, volatile, transient
strictfp, constant, super, implements, do
byte, break, assert, switch, include

Which three are legal array declarations?
int [] myScores [];
char [] myChars;
int [6] myScores;
Dog myDogs [];
Dog myDogs [7];

public interface Foo { int k = 4; /* Line 3 */}Which three piece of codes are equivalent to line 3?1. final int k = 4;2. public int k = 4;3. static int k = 4;4. abstract int k = 4;5. volatile int k = 4;6. protected int k = 4;
1, 2 and 3
2, 3 and 4
3, 4 and 5
4, 5 and 6

Which is the valid declarations within an interface definition?
public double methoda();
public final double methoda();
static void methoda(double d1);
protected void methoda(double d1);

Which of these jump statements can skip processing remainder of code in its body for a particular iteration?
break
return
exit
continue

What is process of defining two or more methods within same class that have same name but different parameters declaration?
method overloading
method overriding
method hiding
None of the mentioned

Copy link:
Copy

Authored by:

Tests Created: 1

  • No Follower
  • Send message
Discussion

LokeshSharma

test

1742 days 4 hours 22 minutes ago

Your Facebook Friends on WizIQ