0% found this document useful (0 votes)
295 views

Have A Cup of Java - Answer Key Hey Geek, Here Is The Answer Key of The Quiz

Here are the answers: 1. a 2. a 3. b 4. a 5. c 6. a 7. d 8. b 9. c 10. b 11. c 12. c 13. d 14. c 15. d

Uploaded by

Bittu raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
295 views

Have A Cup of Java - Answer Key Hey Geek, Here Is The Answer Key of The Quiz

Here are the answers: 1. a 2. a 3. b 4. a 5. c 6. a 7. d 8. b 9. c 10. b 11. c 12. c 13. d 14. c 15. d

Uploaded by

Bittu raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

HAVE A CUP OF JAVA - ANSWER KEY

Hey Geek,

Here is the answer key of the quiz.

1) What is the size of float and double in java?


a. 32 and 64
b. 32 and 32
c. 64 and 64
d. 64 and 32

2) Number of primitive data types in Java are?


a. 6
b. 7
c. 8
d. 9

3) Select the valid statement.


a. char[] ch = new char(5)
b. char[] ch = new char[5]
c. char[] ch = new char()
d. char[] ch = new char[]

4) Arrays in java are-


a. Object references
b. Objects
c. Primitive data types
d. None

5) compareTo() returns
a. True
b. False
c. An int value
d. None

6) To which of the following does the class string belong to.


a. Java.lang
b. Java.awt
c. Java.applet
d. Java.string

7) Identify the infinite loop.


a. for(; ;)
b. for(int i =0; i<1, i - -)
c. for(int i=0 ; ; i ++)
d. All of the above

8) Which provides a runtime environment for java byte code to be executed?


a. JDK
b. JVM
c. JRE
d. JAVAC

9) Which of the following are not Java keywords?


a. double
b. Switch
c. Then
d. Instanceof

10) Java language was initially called as ________


a. Sumatra
b. J++
c. Oak
d. Pine

11) Modulus operator (%) can be applied to which of these?


a. Integers
b. Floating-point numbers
c. Both A and B
d. None of These

12) Which of the following are not Java modifiers?


a. Public
b. Private
c. Friendly
d. Transient

13) What is the full form of JVM?


a. Java Very Large Machine
b. Java Verified Machine
c. Java Very Small Machine
d. Java Virtual Machine

14)

Which of the following are not the methods of the Thread class?

a. yield()
b. sleep(long msec)
c. go()
d. stop()

15) Which of these is not a bitwise operator?


a. &' Operator
b. &=' Operator
c. |=' Operator
d. <=' Operator

You might also like