Logo

Java Questions Set 127:

Quiz Mode

Runnable is a

1
2
3
4

Solution:

 Every class containing abstract method must be declared abstract 

1
2

Solution:

What is the output of the following Java program?

1
2
3

Solution:

What is the output of the following code?

var str = "123";

var intval = 123;

alert(str + intval)

1
2
3
4

Solution:

What will be the value returned if a string is greater than the string compared?

1
2
3
4

Solution:

Which of these is a mechanism for naming and visibility control of a class and its members?

1
2
3
4

Solution:

What should the expression in the condition of a ternary operator evaluate to?

1
2
3
4

Solution:

Which of the following class relies on its subclass for the complete implementation of its methods?

1
2
3
4

Solution:


interface tuf{

int number = 10;

}

public class demo {

public static void main(String[] args) {

tuf.number = 100;

System.out.println(tuf.number);

}

}

1
2
3
4

Solution:

public class Demo123{

     public static void main(String args[]){

String r = "Abekus";

char ch ='5';

if( ch >='0' && ch <='9')

   System.out.println("Its NO");

else System.out.println("Its Not a No");

   System.out.println(r+ch);

   }

}

1
2
3
4

Solution: