Logo

Java Questions Set 139:

Quiz Mode

A local variable is never static

1
2

Solution:

What is the output of the following code?

1
2
3
4

Solution:

 Garbage Collection can be controlled by a program 

1
2

Solution:

Which keyword is used to upper bound a wildcard?

1
2
3
4

Solution:

Which of this interface is not a member of the java.io package?

1
2
3
4

Solution:

Declaring an abstract class is useful to force developers to extend the class not to use its capabilities 

1
2

Solution:

Which of the following is a correct way to import a package.

1
2
3
4

Solution:

method overloading 

1
2
3
4

Solution:

class

{

public static void main(String args[]) 

byte a = 32;

int i;

byte b; 

i = a << 2;

b = (byte) (a << 2);

System.out.print(i + " " + b);

}

1
2
3
4

Solution:

Statement 1- An Abstract class can be extended

Statement 2-An Abstract class can be used as data type

Statement 3- A subclass of non-abstract superclass can be abstract

1
2
3
4

Solution: