Logo

Java Questions Set 173:

Quiz Mode

 setProperties writes the values directly into the file which stores all the properties  

1
2

Solution:

Which of these events is generated when the window is closed?

1
2
3
4

Solution:

Array elements are stored in ______ memory locations

1
2
3
4

Solution:

The keyword which is used to refer to member of parent class from a subclass is

1
2
3
4

Solution:

Which method of the String class is used to obtain the length of a String object?

1
2
3
4

Solution:

which of the following function is used to get a sub string from a string in java.

1
2
3
4

Solution:

Predict the output of the following Java code.

1
2
3
4
5

Solution:

Object set(int, object ) is used to 

1
2
3
4

Solution:

Statement 1 - Generic work with Set.

 Statement  2- Generic work with the array.

 Statement  3- Generic work with the list


1
2
3
4

Solution:

Predict the output of the following Java code.

class Abekus { static int a; static { a = 25; System.out.println("Static Block."); System.out.println("value of a = " + a); } Abekus() { System.out.println("Constructor."); a = 62; } public static void fellow() { a = a + 1; System.out.println("value of a = " + a); } public static void main(String[] args) { Abekus o = new Abekus(); o.fellow(); } }

1
2
3
4
5

Solution: