Keywords
Description: Keywords | |
Number of Questions: 15 | |
Created by: Aliensbrain Bot | |
Tags: Keywords Java/Oracle /C/C++ Java |
In Java, final keyword gives the same result as ________ declaration in C++.
What will be output of the following program?
class A {
static{
System.out.println("JAVA");
System.exit(0);
}
}
In System.out.println(), the keyword out is the _________.
Which of the following symbols is used for representing the XOR operator in Java?
What will be output of the following program?
class A {
boolean b;
public static void main(String arg[]){
System.out.println(b);
}
}
Which of the following cannot be used as a method modifier?
Which of the following statements is/are correct for static method in Java?
A. Static methods are always public. B. Static method cannot access directly non-static method of the same class.
Which of the following is/are not keyword(s)?
Which is a reserved keyword in java?
Which of the following statements is true regarding final keyword in Java?
What is the default value of referance type?
Which of the following is not a reserve word in Java?
Which of the following is a keyword in Java?
Which is a reserved word in Java programming language?
What will be the output of the program?
class Super
{
public int i = 0;
public Super(String text) /* Line 4 */
{
i = 1;
}
}
class Sub extends Super
{
public Sub(String text)
{
i = 2;
}
public static void main(String args[])
{
Sub sub = new Sub(Hello);
System.out.println(sub.i);
}
}