Logo

Java Concepts And Its Programming MCQs

Option A: .java file

Option B: .jsp file

Option C: .class file

Option D: None of above

Correct Answer: .class file


Click for More Details

Option A: x++

Option B: ++x

Option C: x=x-1

Option D: None of these

Correct Answer: x++


Click for More Details

Option A: java.awt

Option B: javax.swing

Option C: java.applet

Option D: java.io

Correct Answer: java.awt


Click for More Details

Option A: TRANSACTION_READ_UNCOMMITTED

Option B: TRANSACTION_SERIALIZABLE

Option C: Only A

Option D: Both A and B

Correct Answer: Both A and B


Click for More Details

Option A: 0

Option B: 1

Option C: 2

Option D: 3

Correct Answer: 0


Click for More Details

Option A: overloading

Option B: overriding

Option C: cloning

Option D: coping

Correct Answer: cloning


Click for More Details

Option A: Constructor

Option B: Destructors

Option C: Variable

Option D: Object

Correct Answer: Constructor


Click for More Details

Option A: Synchronized methods

Option B: Asynchronized methods

Option C: Serialized methods

Option D: None of above

Correct Answer: Synchronized methods


Click for More Details

Option A: short, 8

Option B: byte, 8

Option C: short, 16

Option D: short, 16

Correct Answer: byte, 8


Click for More Details

Option A: throw

Option B: throws

Option C: extend

Option D: implements

Correct Answer: implements


Click for More Details

Option A: Method

Option B: Keyword

Option C: Keyword and Method

Option D: None of above

Correct Answer: Method


Click for More Details

Option A: java.util.Date

Option B: java.util.Time

Option C: java.sql.Time

Option D: None of above

Correct Answer: java.util.Date


Click for More Details

Option A: arrayName[] p = new arrayName[5];

Option B: arrayName p[][] = new arrayName[2][];

Option C: arrayName[] p [];

Option D: arrayName p[5];

Correct Answer: arrayName p[5];


Click for More Details

Option A: Prints true

Option B: Prints false

Option C: Will not compile as boolean is not initialized

Option D: Will not compile as boolean can never be static

Correct Answer: Prints false


Click for More Details

Option A: token

Option B: string

Option C: literal

Option D: operator

Correct Answer: token


Click for More Details

Option A: 1

Option B: 2

Option C: 3

Option D: 4

Correct Answer: 2


Click for More Details

Option A: Java

Option B: javap

Option C: javac

Option D: none of above

Correct Answer: Java


Click for More Details

Option A: Single

Option B: Mulilevel

Option C: Hirarchical

Option D: Multiple

Correct Answer: Multiple


Click for More Details

Option A: java.lang package

Option B: java.util package

Option C: java.awt package

Option D: java.io package

Correct Answer: java.lang package


Click for More Details

Option A: Singlethreaded

Option B: Multithreaded

Option C: Both of above

Option D: None of above

Correct Answer: Multithreaded


Click for More Details

Option A: Can store multiple values

Option B: It is syntax

Option C: Both of above

Option D: None of above

Correct Answer: Can store multiple values


Click for More Details

Option A: Overriding

Option B: Overloading

Option C: Constructor

Option D: none of these

Correct Answer: Overloading


Click for More Details

Option A: 24

Option B: 48

Option C: 96

Option D: 192

Correct Answer: 48


Click for More Details

Option A: 5

Option B: 6

Option C: 7

Option D: 8

Correct Answer: 8


Click for More Details

Option A: JVM

Option B: virtual machine

Option C: applet engine

Option D: None of above

Correct Answer: applet engine


Click for More Details

Option A: 127

Option B: -127

Option C: 129

Option D: -129

Correct Answer: 127


Click for More Details

Option A: 32 and 64

Option B: 64 and 64

Option C: 32 and 32

Option D: 64 and 32

Correct Answer: 32 and 64


Click for More Details

Option A: java.util package

Option B: java.io package

Option C: java.lang package

Option D: java.awt package

Correct Answer: java.util package


Click for More Details

Option A: Two type are compatible and size of destination type is equal of source type.

Option B: Two type are compatible and size of destination type is larger than source type.

Option C: Two type are compatible and size of destination type is shorter than source type.

Option D: All of the above

Correct Answer: Two type are compatible and size of destination type is larger than source type.


Click for More Details

Option A: Multiple inheritance

Option B: Multilevel inheritance

Option C: Hierarchical inheritance

Option D: None of above

Correct Answer: Multiple inheritance


Click for More Details

Option A: Classes and Interfaces

Option B: Classes

Option C: Editing tools

Option D: Editing tools and Interfaces

Correct Answer: Classes and Interfaces


Click for More Details

Option A: executeUpdate()

Option B: executeQuery()

Option C: execute()

Option D: None of above

Correct Answer: executeUpdate()


Click for More Details

Option A: Input stream class

Option B: Object class

Option C: Math class

Option D: None of above

Correct Answer: Math class


Click for More Details

Option A: JNI

Option B: FJI

Option C: NJI

Option D: JFI

Correct Answer: JNI


Click for More Details

Option A: An object of B contains data fields j, k, m

Option B: An object of B contains data fields k, m

Option C: An object of B contains data fields j, m

Option D: An object of B contains data fields i, j, k, m

Correct Answer: An object of B contains data fields j, k, m


Click for More Details

Option A: Prints 2.5

Option B: Raises an exception

Option C: Raises an error as STATIC is used as a variable which is a keyword

Option D: None of these

Correct Answer: Prints 2.5


Click for More Details

Option A: int

Option B: byte

Option C: char

Option D: bollean

Correct Answer: byte


Click for More Details

Option A: Object

Option B: Variable

Option C: Class

Option D: Method

Correct Answer: Class


Click for More Details

Option A: .class file

Option B: .java file

Option C: .java html

Option D: .applet file

Correct Answer: .class file


Click for More Details

Option A: Stack

Option B: Maps

Option C: Queue

Option D: Array

Correct Answer: Queue


Click for More Details

Option A: Type-1 driver

Option B: Type-2 driver

Option C: Type-3 driver

Option D: Type-4 driver

Correct Answer: Type-4 driver


Click for More Details

Option A: 0

Option B: 1

Option C: 2

Option D: 3

Correct Answer: 1


Click for More Details

Option A: yield() method

Option B: Suspend() method

Option C: start() method

Option D: resume() method

Correct Answer: resume() method


Click for More Details

Option A: signed

Option B: unsigned

Option C: Both of the above

Option D: None of these

Correct Answer: signed


Click for More Details

Option A: println

Option B: final

Option C: super

Option D: static

Correct Answer: final


Click for More Details

Option A: java.io package

Option B: java.lang package

Option C: java.awt package

Option D: java.util package

Correct Answer: java.lang package


Click for More Details

Option A: boxing

Option B: wrapping

Option C: autoboxing

Option D: instantiation

Correct Answer: boxing


Click for More Details

Option A: A Boolean literal

Option B: A Java keyword

Option C: Same as value 0

Option D: Same as value 1

Correct Answer: A Boolean literal


Click for More Details

Option A: Web browser

Option B: Java environment

Option C: System software

Option D: IDE

Correct Answer: Web browser


Click for More Details

Option A: java array

Option B: java architecture

Option C: java archived

Option D: none of these

Correct Answer: java archived


Click for More Details

Option A: Declare the method with the keyword public.

Option B: Declare the method with the keyword private.

Option C: Do not declare the method with any accessibility modifiers.

Option D: Declare the method with the keyword public and private.

Correct Answer: Do not declare the method with any accessibility modifiers.


Click for More Details

Option A: java dissasamebler

Option B: java header file

Option C: java interpreter

Option D: java compiler

Correct Answer: java header file


Click for More Details

Option A: paint() method

Option B: main() method

Option C: run() method

Option D: drawString() method

Correct Answer: paint() method


Click for More Details

Option A: java

Option B: javac

Option C: javap

Option D: none of these

Correct Answer: java


Click for More Details

Option A: 8 bit

Option B: 16 bit

Option C: 32 bit

Option D: 64 bit

Correct Answer: 32 bit


Click for More Details

Option A: stop() method

Option B: start() method

Option C: init() method

Option D: destroy() method

Correct Answer: init() method


Click for More Details

Option A: 7 8

Option B: 8 7

Option C: 9 8

Option D: None

Correct Answer: 8 7


Click for More Details

Option A: From within protected methods you do not have access to public methods.

Option B: This method is only accessible from inside the class itself and from inside all subclasses.

Option C: In a class, you cannot declare methods with a lower visibility than the visibility of the class in which it is defined.

Option D: This method is accessible from within the class itself and from within all classes defined in the same package as the class itself.

Correct Answer: This method is accessible from within the class itself and from within all classes defined in the same package as the class itself.


Click for More Details

Option A: 6

Option B: 2

Option C: 5

Option D: 3

Correct Answer: 5


Click for More Details

Option A: just in time

Option B: java in time

Option C: join in time

Option D: none of above

Correct Answer: just in time


Click for More Details

Option A: Interface

Option B: Class

Option C: Variable

Option D: Method

Correct Answer: Interface


Click for More Details

Option A: At Compile-time

Option B: At run-time

Option C: Depends on the code

Option D: None of these

Correct Answer: At run-time


Click for More Details

Option A: reclaim() method

Option B: finalize() method

Option C: final() method

Option D: both b and c

Correct Answer: finalize() method


Click for More Details

Option A: .class

Option B: .doc

Option C: .java

Option D: .cdr

Correct Answer: .class


Click for More Details

Option A: java.util.LinkedList

Option B: java.util.TreeMap

Option C: java.util.SortedSet

Option D: java.util.HashSet

Correct Answer: java.util.TreeMap


Click for More Details

Option A: abstract

Option B: static

Option C: volatile

Option D: final

Correct Answer: static


Click for More Details

Option A: Type-1 driver

Option B: Type-2 driver

Option C: Type-3 driver

Option D: Type-4 driver

Correct Answer: Type-4 driver


Click for More Details

Option A: int

Option B: char

Option C: string

Option D: double

Correct Answer: string


Click for More Details

Option A: javacmd

Option B: javaamd

Option C: javap

Option D: java

Correct Answer: javap


Click for More Details

Option A: java compiler

Option B: java debugger

Option C: java Interpreter

Option D: java Disassemble

Correct Answer: java Disassemble


Click for More Details

Option A: Lang package

Option B: util package

Option C: io package

Option D: All of above

Correct Answer: Lang package


Click for More Details

Option A: byte to int

Option B: short to int

Option C: long to int

Option D: int to long

Correct Answer: int to long


Click for More Details

Option A: Package

Option B: Wrapper

Option C: Java object

Option D: Collection object

Correct Answer: Collection object


Click for More Details

Option A: Deep cloning

Option B: Shallow cloning

Option C: Both of above

Option D: None of above

Correct Answer: Deep cloning


Click for More Details

Option A: java Disassemble

Option B: java Interpreter

Option C: java compiler

Option D: java debugger

Correct Answer: java debugger


Click for More Details

Option A: Byte code

Option B: First code

Option C: Mid code

Option D: None of above

Correct Answer: Byte code


Click for More Details

Option A: Sub class create object of super class

Option B: Sub class extends Base class

Option C: Sub class extends super class

Option D: All of the above

Correct Answer: Sub class extends super class


Click for More Details

Option A: getConnection()

Option B: executeQuery()

Option C: prepareCall()

Option D: executeUpdate()

Correct Answer: getConnection()


Click for More Details

Option A: Final class

Option B: abstract class

Option C: parent class

Option D: None of above

Correct Answer: Final class


Click for More Details

Option A: moderate typed

Option B: strogly typed

Option C: weakly typed

Option D: none of these

Correct Answer: strogly typed


Click for More Details