Java Programming Objective Questions 1


Questions by Rejinpaul.com

1.Which will legally declare, construct, and initialize an array?
a)int [] myList = {"1", "2", "3"};
b)int [] myList = (5, 8, 2);
c) int myList [] [] = {4,9,7,0};
d)int myList [] = {4, 3, 7};


◊ View answer     ◊ Share This In FB _____________________________________________________________________________________________________________________


2.Which is a reserved word in the Java programming language?
a)method
b)native
c) subclasses
d)reference


◊ View answer     ◊ Share This In FB _____________________________________________________________________________________________________________________


3.Which is a valid keyword in java?
a)interface
b) string
c) Float
d)unsigned


◊ View answer     ◊ Share This In FB _____________________________________________________________________________________________________________________


4.Which is a valid declarations of a String?
a)String s1 = null;
b)String s2 = 'null';
c)String s3 = (String) 'abc';
d) String s4 = (String) '\ufeed';


◊ View answer     ◊ Share This In FB _____________________________________________________________________________________________________________________


5.What is the numerical range of a char?
a)-128 to 127
b)-(2^15) to (2^15) - 1
c) 0 to 32767
d)0 to 65535


◊ View answer     ◊ Share This In FB _____________________________________________________________________________________________________________________

Pages:

1 2 3 4

Ad Inside Post

Comments system

Disqus Shortname