Test Series - java

Test Number 6/64

Q:  What does a Data Type in Java refers to?
A. The place where data is stored
B.  The technique how data is retreived
C. The type or variety of data being handled for reading and writing
D. None of the above
Solution: Integers, Real numbers, Boolean, Characters etc
Q: Choose the wrong statement about Java programming?
A. Java supports unsigned integers
B. Java supports signed integers
C. Java supports signed char
D. None of the above
Solution: Only C language supports unsigned integers. Java does not support.
Q: Which data type among the following is an implementation of Objects or OOPs?
A. byte
B. int
C. char
D. None of the above
Solution: All primitive data types are implemented in a Non-Object Oriented way.
Q: What is a Primitive Data Type in Java?
A. Data type, which is implemented in an Object-oriented way.
B. Data Type which is implemented in a machine-dependent way
C.  Data Type which is implemented in a non-object oriented way.
D. None of the above
Solution: no solution
Q: which among the following is not a Data Type in Java?
A. short
B. int
C. long double
D. double
Solution: "long double" is present only in C language.
Q: Which among the following is not a valid Data Type in Java?
A. long
B. bool
C. double
D. float
Solution: It is "boolean" not "bool".
Q: Which is the data type used mostly to handle streams and buffers in Java language?
A. short
B. int
C. byte
D.  float
Solution: no solution
Q: Which is the data type that is not recommended for numeric applications in Java?
A. byte
B. float
C. int
D. long
Solution: Size of a byte is only 8 bits. Also, any arithmetic operation produces output in int, float or double. It cannot handle more data.
Q: Choose the number range for byte data type in Java?
A. -127 to +128
B.  -128 to +127
C. 0 to 256
D.  0 to 255
Solution: no solution
Q: What is the size of a SHORT integer in Java?
A. 1 byte
B. 2 bytes
C. 4 bytes
D. 8 bytes
Solution: Number range is -32768 and +32767.
Q: 
A. 
B. 
C. 
D. 
Solution: 

You Have Score    /11