NEW
Font size
WorksheetsJAVA QUIZ-1
Total questions: 10
Worksheet time: 2mins
Which of the following option leads to the portability and security of Java?
a) Bytecode is executed by JVM
b) The applet makes the Java code secure and portable
c) Use of exception handling
d) Dynamic binding between objects
Which of the following is not a Java features?
a)Dynamic
b)Architecture Neutral
c)Use of pointers
d)Object-oriented
Which keyword is used for accessing the features of a package ?
a)package
b)import
c)extends
d)export
What is the range of byte data type in Java ?
a) -128 to 127
b) -32768 to 32767
c) -2147483648 to 2147483647
d) None of the mentioned
Which of these operators is used to allocate memory to array variable in Java ?
a) malloc
b) alloc
c) new
d) new malloc
Which of these is an incorrect array declaration ?
a) int arr[] = new int[5]
b) int [] arr = new int[5]
c) int arr[] = new int[5]
d) int arr[] = int [5] new
Which of these is returned by “greater than”, “less than” and “equal to” operators ?
a) Integers
b) Floating – point numbers
c) Boolean
d) None of the mentioned
What is the output of relational operators ?
a) Integer
b) Boolean
c) Characters
d) Double
Which of the following operators can operate on a boolean variable ?
1. &&
2. ==
3. ?:
4. +=
a) 3 & 2
b) 1 & 4
c) 1, 2 & 4
d) 1, 2 & 3
Which of these have highest precedence ?
a) ()
b) ++
c) *
d) >>
