14th
Jan
Java MCQ

Java MCQ

  • Admin
  • 14th Jan, 2021
  • 673 Followers

Java MCQ Quiz

1) What are the listed concept of OOPs?

  • A. Inheritance
  • B. Abstraction
  • C. Polymorphism
  • D. Encapsulation
  • E. All of the above

2) Which are the various primitive types in JAVA?

  • A. char data type
  • B. boolean data type
  • C. byte data type
  • D. short data type
  • E. All of the above

3) Which of this keyword must be used to inherit a class?

  • A. super
  • B. this
  • C. extent
  • D. extends

4) What do you mean by chained exceptions in Java?

  • A. Exceptions occurred by the VirtualMachineError.
  • B. An exception caused by other exceptions.
  • C. Exceptions occur in chains with discarding the debugging information.
  • D. None of the above

5) Which keyword is used for accessing the features of a package?

  • A. package
  • B. import
  • C. extends
  • D. export
Download Free : Java MCQ PDF

6) Which of the following is a reserved keyword in Java?

  • A. object
  • B. strictfp
  • C. main
  • D. system

7) Which of the following for loop declaration is not valid?

  • A. for ( int i = 99; i >= 0; i / 9 )
  • B. for ( int i = 7; i <= 77; i += 7 )
  • C. for ( int i = 20; i >= 2; - -i )
  • D. for ( int i = 2; i <= 20; i = 2* i )

8) What are the features of JAVA?

  • A. Platform independent
  • B. Secured
  • C. Object Oriented
  • D. All of the above

9) What is the use of the intern() method?

  • A. It returns the existing string from memory.
  • B. It creates a new string in the database.
  • C. It modifies the existing string in the database.
  • D. None of the above

10) JDK stands for ___ which is a software development environment which is used to develop Java applications and applets.

  • A. Java Development Kit
  • B. Java Device Kit
  • C. Jar Development Kit
  • D. None of the above

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

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

12) What do you mean by nameless objects?

  • A. An object created by using the new keyword.
  • B. An object of a superclass created in the subclass.
  • C. An object without having any name but having a reference.
  • D. An object that has no reference.

13) Which of the following represent ternary operator in JAVA?

  • A. ? :
  • B. ||
  • C. &&
  • D. All of the above

14) Which package contains the Random class?

  • A. java.util package
  • B. java.lang package
  • C. java.awt package
  • D. java.io package

15) In which memory a String is stored, when we create a string using new operator?

  • A. Stack
  • B. Heap memory
  • C. Random storage space
  • D. String memory

16) What is the default encoding for an OutputStreamWriter?

  • A. UTF-8
  • B. Default encoding of the host platform
  • C. UTF-12
  • D. None of the above

17) JAR stands for ___ in JAVA.

  • A. Java ARchive
  • B. Java Application Resource
  • C. Java Application Runner
  • D. None of the above

18) Java was developed by Sun Microsystems in the year __.

  • A. 1995
  • B. 1996
  • C. 1998
  • D. 1999

19) ___ is known as the father of Java.

  • A. James Gosling
  • B. Rasmus Lerdrof
  • C. Denis Richie
  • D. None of the above

20) What is JAVA?

  • A. scripting language
  • B. programming language
  • C. markup language
  • D. All of the above

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
Dec
Laravel MCQ
01st
Dec
React JS MCQ
01st
Jan
AngularJs MCQ
01st
Jul
Node js MCQ
01st
Jul
Angular 2 MCQ
01st
Jul
JSON MCQ