JOIN ADRE 2.0 Telegram Group

Data Types and Variables - Multiple Choice Questions with Answers on Core Java

11 Which one does not have a valueOf(String) method?
A Integer
B Boolean
C Long
D Short

Answer: Option [D]

Java Data Type Short does not have a ValueOf(String) method. The other data types Integer, Boolean, Long, Char, Float, Double have support for the ValueOf(String) method.

12 Which of the following is NOT an example of a data type?
A int
B public
C boolean
D double

Answer: Option [B]

public is not a data type. It is a Java Access modifier. The other Access modifiers are private and protected.



13 Int, long, byte, short are the data types of _____data types?
A unsigned
B signed
C both [A] and [B]
D None of these

Answer: Option [B]
14 Which of the following is correct?
A int a = 16, a>>2 = 4
B int b = -8, b>>1 = -4
C int a = 16, a>>>2 = 4
D All of the above

Answer: Option [D]
15 Which of the following is the mutable wrapper class?
A Integer
B BigInteger
C Boolean
D Character

Answer: Option [B]

Java wrapper classes are immutable. BiInteger are mutable.

Take Mock Tests

Government Schemes Mock Test Start Test!
Political Science Mock Test – 42 Start Test
History Test – 190 Start Test
Quantitative Aptitude Test Start Test!
Trigonometry - Mock Test Start Test!
Data Interpretation - Mock Test Start Test!
General Awareness - Mock Test Start Test!
Reasoning Ability - Mock Test Start Test!
Englist(Antonyms) Mock Test 1 Start Test!
Quantitative Aptitude (Percentage) Mock Test Start Test!
Economy Mock Test 1 Unlock Test!
Books & Authors - Test 2 Unlock Test!


Assam Direct Recruitment Test Series