JAVA 8

COEP
Lets Crack Online Exam

IT Interview Exam Questions: JAVA 8 (IT Campus Placement)

Subject: JAVA 8

Part 8: List for questions and answers of JAVA

 

Q1. which of the following is the smallest integer data type?

a) int

b) long

c) byte

d) short

 

Q2. which of the following is not a primitive data type

a) byte

b) short

c) enum

d) int

 

Q3. which value can not store character data type

a) Digit

b) Special character

c) String

d) Letter

 

Q4. which of the following data types comes under floating data types?

a) byte

b) int

c) float

d) long

 

Q5. Range of byte data type is?

a) -128 to 255

b) -128 to 256

c) -128 to 127

d) -127 to 128

 

Q6. In order to fetch stream of data from network or file, following data type used?

a) double

b) char

c) int

d) byte 

 

Q7. what is size of integer in java programming

a) 4 bytes

b) 5 bytes

c) 2 bytes

d) 8 bytes

 

Q8. How many byte will byte data type take in java?

a) 1

b) 2

c) 3

d) 4

 

Q9. which data type can store 64 bit value?

a) double

b) int

c) long

d) float

 

Q10. Short data type has a minimum value of………..?

a) -32767

b) -2,147,483,648

c) -32768

d) -127

 

Q11. Default value of “double” data type is?

a) 0

b) 0.0

c) null

d) 0.0d

 

Q12. What is the range of data type short in Java?

a) -128 to 127

b) -32768 to 32767

c) -2147483648 to 2147483647

d) None of the mentioned

 

Q13. An expression involving byte, int, and literal numbers is promoted to which of these?

a) int

b) long

c) byte

d) float 

 

Q14. Which of these literals can be contained in a data type float variable?

a) 1.7e-308

b) 3.4e-038

c) 1.7e+308

d) 3.4e-050

 

Q15. Which data type value is returned by all transcendental math functions?

a) int

b) float

c) double

d) long

 

Q16. What is the range of data type int in Java?

a) -128 to 127

b) -32768 to 32767

c) -2147483648 to 2147483647

d) None of the mentioned

 

Q17. Default value of Boolean data type in java

a) true

b) false

c) 1

d) 0

 

Q18. which of the following is the reference data type?

a) int

b) short

c) double

d) array

 

Q19. which notation is used for newline in java?

a) \n

b) \r

c) \t

d) \u

 

Q20. Which data type value is returned by all transcendental math functions?

a) int

b) float

c) double

d) long 

 

Part 8: List for questions and answers of JAVA

 

Q1. Answer: c

 

Q2. Answer: c

 

Q3. Answer: d

 

Q4. Answer: c

 

Q5. Answer: a

 

Q6. Answer: d

 

Q7. Answer: a

 

Q8. Answer: a

 

Q9. Answer: a

 

Q10. Answer: a

 

Q11. Answer: d

 

Q12. Answer: b

 

Q13. Answer: a

 

Q14. Answer: b

 

Q15. Answer: c

 

Q16. Answer: c

 

Q17. Answer: b

 

Q18. Answer: d

 

Q19. Answer: a

 

Q20. Answer: c