Java MCQ - English


Variable MCQ Questions and Answers

Home | Java | Variable

Java Variable MCQ Questions and Answers: here learn quiz questions on Java Variables and download pdf of 50 questions. we provide most important objective questions for all Competitive Exam.

Page: 1/2

1) Which of these can not be used for a variable name in Java?

2) Literals in java must be appended by which of these?

3) Literal can be of which of these data types?

4) Which of these values can a boolean variable contain?

5) Which of these occupy first 0 to 127 in Unicode character set used for characters in Java?

6) Which one is a valid declaration of a boolean?

7) Java is a _______ language.

8) In Java, the word true is ................

9) What is the output for the below code ?

public class Test
{
public static void main(String[] args)
{
int i = 010;
int j = 07;
System.out.println(i);
System.out.println(j);
}
}

10) What is the output for the below code ?

 public class Test
{
public static void main(String[] args)
{
byte b = 6;
b+=8;
System.out.println(b);
b = b+7;
System.out.println(b);
}
}