What is the output of the following code?
e.getmesssage() is used
Which of the following keywords is used with the switch statement?
element() : This method retrieves and remove the head (first element) of this list.
The class which always create a single object
Select the correct staement
public class outputs
{
static int cube(int x){
return x*x+x*x+ ++x*x;
}
public static void main(String args[]){
int result=outputs.cube(5);
System.out.println(result);
}
}
Select the correct option for the following Java code.
class Abekus {
public static void main(String[] args)
{
int A1[] = new int[10];
int A2[] = new int[-5];
System.out.println(A1.length);
System.out.println(A2.length);
}
}
abstract class A
{
public a1(){
System.out.println("Abekus");
}
}
class B extends A{
public b1{
System.out.println("please give feedback");
}
}
class C extends B{
public c1{
System.out.println("success is sure");
}
}
class testcase{
public static void main(String args[]){
C obj = new C();
}
}
What will be the output of the following Java program?
class Output
{
public static void main(String args[])
{
char a[] = {'b', '1', 'B', ' '};
System.out.print(Character.isDigit(a[0]) + " ");
System.out.print(Character.isWhitespace(a[3]) + " ");
System.out.print(Character.isUpperCase(a[2]));
}
}