Java MCQ Questions and Answers

The following quiz “Java MCQ Questions and Answers” provides Multiple Choice Questions (MCQs) related to Java Programming. These Java Programming MCQs are also Interviews (campus interview, walk-in interview, company interview), Placement or recruitment, entrance examinations, and competitive examinations oriented. You can practice the below questions to improve your Java skills. You can click on the View Answer button to check the answer if you needed. Let’s solve this Java MCQ Questions and Answers Quiz. So, Java is a programming language and computing platform first released by Sun Microsystems in 1995 and it is a high-level programming language.

You can practice these Java MCQs here and if you want a pdf of Java MCQ Questions And Answers, we will provide a downloading link here soon so please keep visiting here for further modifications. For advanced java MCQs, visit here.

01. Which of the following is not a Java feature?

  1. Object-oriented
  2. Dynamic
  3. Architecture Neutral
  4. Use of pointers

Answer : D
Explanation: The Java programming language does not support pointers; some of the major reasons are given below:
One of the main factors of not using pointers in Java programming is security concerns. Due to pointers, most of the users consider C-programming language very confusing and complex. This is the reason why Green Team (Java Team members) has not introduced pointers in the Java programming language.
Java language provides an effective layer of abstraction to the developers by not using pointers in Java. So option D is correct.

02. Java is a _____ language

  1. Strongly typed
  2. Weakly typed
  3. Moderate typed
  4. None of these

Answer : A
Explanation: Java is a strongly typed programming language.

03. How many primitive data types are there in java?

  1. 9
  2. 8
  3. 6
  4. 7

Answer : B
Explanation: Primitive types are the most basic data types available within the Java programming language. There are 8: boolean, byte, char, short, int, long, float, and double and hence option B is the correct answer.

04. Java is a Successor to which programming language?

  1. C
  2. C++
  3. B
  4. D

Answer : B
Explanation: C++ language introduced Object Oriented Programming (OOPs) concepts which are adopted by Java.

05. Who is known as the father of Java Programming Language?

  1. Charel Babbage
  2. Blais Pascal
  3. James Gosling
  4. Dennis Ritchie

Answer : C
Explanation: James Gosling James is known as the father of Java Programming Language. Gosling along with his team members like Mike Sheridan and Patrick Naughton developed Java programming language.

06. Whic company owns Java at present?

  1. Oracle
  2. Sun Microsystems
  3. IBM
  4. Microsoft

Answer : A
Explanation: Oracle owns java language at present. Oracle acquired Sun Microsystems in the year 2010.

07. Java Source Code is compiled into _________

  1. Source Code
  2. Obj
  3. Bytecode
  4. Exe

Answer : C
Explanation: Java Source Code is compiled into Bytecode and hence option C is correct.

08. Which laboratory was Java invented or developed in?

  1. Bell Laboratory
  2. Dennis Ritchie Office
  3. Johnson and Johnson
  4. Sun Microsystems

Answer : D
Explanation: Java was invented or developed in Sun Microsystems. NFS (Network File System) was also invented by SUN Microsystems.

09. How to compile java code in the command prompt?

  1. javac
  2. java
  3. javac filename
  4. java filename

Answer : A
Explanation: For compiling java code in the command prompt, type javac and press enter to compile your code. If there are no errors in your code, the command prompt will take you to the next line.

10. How to run a java program in the command prompt?

  1. javac
  2. java filename
  3. java
  4. javac filename

Answer : B
Explanation: To run a java program in the command prompt, write java filename.

This Post Has 2 Comments

Leave a Reply