Quiz – JAVA

/5

Misc

1 / 5

What will be the output of below code:

                    

class output

{

public static void main(String args[])

{

String c = "Hello i love java";

boolean var;

var = c.startsWith("hello");

System.out.println(var);

}

}

2 / 5

What will be the output of below code:

                    

class increment {

public static void main(String args[])

{

int i = 5;

System.out.print(++i * 4);

}

}

3 / 5

What will be the output of below code:

                    

class output

{

public static void main(String args[])

{

StringBuffer s1 = new StringBuffer("Quiz");

StringBuffer s2 = s1.reverse();

System.out.println(s2);

}

}

4 / 5

What will be the output of below code:

                    

class String_demo

{

public static void main(String args[])

{

char chars[] = {'a', 'b', 'c'};

String s = new String(chars);

System.out.println(s);

}

}

5 / 5

What will be the error in the following Java code?

Your score is

The average score is 48%

0%

Exit