MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Base types is also called as Primitive types.
A
true
B
false
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -The eight primitive data types are: byte, short, int, long, float, double, char, and boolean. Upper and lower case characters are important in these names. So “byte” is the name of a primitive data type, but “BYTE” is not.

Detailed explanation-2: -Primitive types are the most basic data types available within the Java language. There are 8: boolean, byte, char, short, int, long, float and double . These types serve as the building blocks of data manipulation in Java.

Detailed explanation-3: -All the primitive types are lowercase, making Option A correct. Unlike object reference variables, primitives cannot reference null. String is not a primitive as evidenced by the uppercase letter in the name and the fact that we can call methods on it. You can create your own classes, but not primitives.

Detailed explanation-4: -A primitive type is predefined by the language and is named by a reserved keyword. Primitive values do not share state with other primitive values. The eight primitive data types supported by the Java programming language are: byte: The byte data type is an 8-bit signed two’s complement integer.

There is 1 question to complete.