Is null considered to be an object? Type Yes/No.
try is used for the block to be examined for exceptions
What may be the scope of the protected access modifier in java?
Which of these is a correct way of inheriting class A by class B?
How many times 'abekus' is printed?
public class abekus {
public static void main(String[] args){
for(int i = 0; i<5; i++)
{
System.out.println("abekus");
i++;
i--;
}
}
}
Predict the Output.
class Abekus {
int i = 10;
public
static void main(String[] args)
{
System.out.println(i);
}
static
{
System.out.print(i + " ");
}
}
Java automatic type conversion is done if some conditions are met.
Select the INCORRECT condition.
Statement 1- java. awt package is used for invoking a method remotely
Statement 2- java. applet package is used for invoking a method remotely
Statement 1- java. util the package is used for invoking a method remotely
what should be the output of this code block?
import java.util.*;
class GenericStack < E > {
Stack < E > stack = new Stack < E > ();
public E pop() {
E obj = stack.pop();
return obj;
}
public void push(E obj) {
stack.push(obj);
}
}
public class Test {
public static void main(String args[]) {
GenericStack < String > gs = new GenericStack < String > ();
gs.push("Hello");
System.out.println(gs.pop());
}
}