Java Programming Fundamentals Quiz

Test your knowledge of Java programming concepts including OOP, data types, operators, and core language features. Also includes some general programming language questions.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

x=InStrRev("abc","cba") x=???

  1. 0
  2. 1
  3. true
  4. false
Question 2 Multiple Choice (Single Answer)

x=space(2) y=Len(x) y=????

  1. 1
  2. 2
  3. 3
  4. 4
Question 3 Multiple Choice (Single Answer)

x=strcomp("abc","abc") x=????

  1. 0
  2. 1
  3. 2
  4. 3
Question 4 Multiple Choice (Single Answer)

Read this piece of code carefully if("String".toString() == "String") System.out.println("Equal"); else System.out.println("Not Equal");Answers

  1. 1. the code will compile an print “Equal”.
  2. 2. the code will compile an print “Not Equal”.
  3. 3. the code will cause a compiler error.
  4. None of Above
Question 5 Multiple Choice (Single Answer)

On Which Concept JAVA is Working?

  1. OOPS
  2. Structured
  3. Hiber
  4. None of Above
Question 6 Multiple Choice (Single Answer)

Java is used in Which Applications.

  1. Desktop & web Application
  2. Desktop
  3. Web Application
  4. Other
Question 7 True/False

Java Is Robust Language?

  1. True
  2. False
Question 8 True/False

Is Java Is Platform independent?

  1. True
  2. False
Question 9 True/False

Can JAVA use the Polymorphism & Inheritance?

  1. True
  2. False
Question 10 True/False

In JAVA, Delete Is Keyword?

  1. True
  2. False
Question 11 Multiple Choice (Single Answer)

What is Void In Public Static Void main()

  1. Access modifier
  2. Nothing
  3. Return Type
  4. None Of Above
Question 12 True/False

can we use Hybrid Inheritance In Java.

  1. True
  2. False
Question 13 Multiple Choice (Single Answer)

What Is SuperClass In JAVA

  1. Parent Class
  2. Class
  3. Child Class
  4. None Of Above
Question 14 Multiple Choice (Single Answer)

What is Object??

  1. Instance of Class
  2. Static Variable
  3. Keyword
  4. None Of above
Question 15 Multiple Choice (Single Answer)

JAVA Runs on ........

  1. Windows
  2. MAC
  3. unix\Linux
  4. All of the Above
Question 16 Multiple Choice (Single Answer)

What's the difference between an Applet and an application ?

  1. An application is only available on Windows
  2. Applets can paint words, applications cannot.
  3. Applets are run over the web.
  4. None of the above.
Question 17 Multiple Choice (Single Answer)

The following statements make “length” be what number ? int length; length = 4; length ++;

  1. 4
  2. 5
  3. 6
  4. 7
Question 18 Multiple Choice (Single Answer)

Booleans are _______.

  1. True or False
  2. Single characters
  3. Text
  4. All numbers
Question 19 Multiple Choice (Single Answer)

What will be the value of “num” after the following statements? int num; num = (5+4); num = num / 9; num = 12;

  1. 0
  2. 1
  3. 12
  4. 9
Question 20 Multiple Choice (Single Answer)

If you want your conditional to depend on two conditions BOTH being true, what is the proper notation to put between the two Boolean statements ?

  1. &
  2. &&
  3. |
  4. ||