Java MCQ Questions

Java MCQ Questions

  • Sharad Jaiswal
  • 23rd Nov, 2021

We have listed here the best Java MCQ Questions for your basic knowledge of Java Programming. This Java MCQ Test contains 25+ Java Multiple Choice Questions. You have to select the right answer to every question to check your final preparation for Java MCQ Interview or Exams.

Practice Best Java MCQ Questions

1) Who is known as father of Java Programming Language?

  • A. James Gosling
  • B.Charel Babbage
  • C.Blais Pascal
  • D.M. P Java

2) What is the full form of JVM?

  • A. Java Verified Machine
  • B.Java Very Small Machine
  • C.Java Very Large Machine
  • D.Java Virtual Machine

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

  • A. JDK
  • B.JRE
  • C.JVM
  • D.JAVAC

4) Java declaration statement must end with

  • A. Comma
  • B.Colon
  • C.Full stop
  • D.Semicolon

5) In Java, JAR stands for___

  • A. Java Archive Runner
  • B.Java ARchive
  • C.Java Application Runner
  • D.Java Application Resource

6) How many threads can be executed at a time

  • A. One thread
  • B.Two threads
  • C.Multiple threads
  • D.Only main (main() method) threa

7) Which of the following is a mutable class in java?

  • A. java.lang.Byte
  • B.java.lang.Short
  • C.java.lang.String
  • D.java.lang.StringBuilder

8) Java language was initially called____

  • A. Oak
  • B.Pine
  • C.J++
  • D.Bamboo

9) Interface with no fields or methods is known as_______.

  • A. Runnable Interface
  • B.CharSequence Interf
  • C.Abstract Interface
  • D.Marker Interface

10) Which symbol is used to the values of automatically initialized arrays?

  • A. Comma
  • B.Braces
  • C.Parentheses
  • D.Brackets

11) Basic Java language functions are stored_______

  • A. java.io
  • B.java.net
  • C.java.lang
  • D.java.util

12) A package is a collection of

  • A. Classes
  • B.Interfaces
  • C.Editing tools
  • D.Both A & B

13) In an object oriented programming

  • A. Class create objects
  • B.Objects create classes
  • C.Classes use methods to communicate
  • D.None of them

14) The java visibility modifier is

  • A. Public
  • B.Private
  • C.Protected
  • D.All of the above

15) The wrapping up of data and functions into a single unit is called

  • A. Abstraction
  • B.Polymorphism
  • C.Encapsulation
  • D.Data Hiding

16) In character stream I/O a single read/write operation performs

  • A. One byte read/write at a time.
  • B.Two bytes read/write at a time.
  • C.Four bytes read/ write at a time.
  • D.Eight bytes read/ write at a time.

17) Add null key to a Treemap_________

  • A. Compile
  • B.Object
  • C.Runtime
  • D.None of the above

18) ________is used to find and fix bugs in the Java programs.

  • A. Java Virtual Machine
  • B.Java Debugger
  • C.Java Archieve
  • D.None of the above

19) Which of the following option is a valid long literal?

  • A. 0xnf029L
  • B.ABH8097
  • C.L990023
  • D.D904423

20) ________ is the order of variables in Enum?

  • A. Random order
  • B.Ascending order
  • C.Descending order
  • D.Depends on the order

21) Which will legally declare, construct, and initialize an array?

  • A. int [] myList = {};
  • B.int myList [] = {4, 3, 7};
  • C.int [] myList = (5, 8, 2);
  • D.int myList [] [] = {4,9,7,0};

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
Nov
JSF MCQ