This quiz assesses knowledge in Java programming, focusing on interface definitions, array creation, inheritance, class subclassing, method declaration, and types of inheritance. It's designed for learners to validate their Java training effectively.
Yes
No
Rate this question:
IndexOutOfBoundException
4
NullPointerException
3
Rate this question:
Abstract class
Public class
Final class
None of above
Rate this question:
Single
Multiple
Multilevel
Hirarchical
Rate this question:
Yes
No
Rate this question:
HashMap
Vector
LinkedList
Queue
Rate this question:
Heap Memory
Stack memory
Method area
None
Rate this question:
Object
Throwable
String
None
Rate this question:
Inherit
Extends
Inheritance
Extend
Rate this question:
Yes
No, all methods are abstract methods by default
Depends
None
Rate this question:
True
False
Rate this question:
OutOfMemory Error is thrown
Garbage collection will run and if memory available new object will be created else OutofMemory is thrown
Memory will be allocted from stack
None
Rate this question:
Compiles and Runs successfully
Compilation error
RuntimeError
None
Rate this question:
Int javaArray = new int[10];
Int avaArray new = myArray[ ];
Int[] javaArray = new int[10];
None
Rate this question:
Yes
No
Rate this question:
2 bytes
4 bytes
6 bytes
Depends on platform
Rate this question:
Only the Company class
Any class
Any class in com.cisco.mycompany package
Any class that extends Company
Rate this question:
Vector
ArrayList
HashMap
String
Rate this question:
An object, variable or method goes out of scope.
An object or variable goes out of scope.
A variable goes out of scope
Before garbage collection
Rate this question:
Throwable
Exception
RuntimeException
None
Rate this question:
Base Base Derived
Base Derived Derived
Base Derived Base
Derived Derived Derived
Rate this question:
Int long int
Int int int
Int long long
Long long long
Rate this question:
1
3
1 3
2 3
Rate this question:
The sum of a and b is 20
The sum of a and b is 1010
Compilation error
None
Rate this question:
Long double
Int double
Long float
Short float
Rate this question:
In a single file any number of class can be defined
There can be only one public class in a single java file
Name of public file and class name should match
All of above
Rate this question:
Compilation fails.
"1" is printed
2" is printed.
"3" is printed.
Rate this question:
Yes
No
Rate this question:
NullPointerException
It will print String representation
Neither a and b
ClasscastException
Rate this question:
"doCdoBdoA" is printed
"doAdoBdoC" is printed
"doBdoAerror" is printed
"error" is printed
Rate this question:
Compilation fails.
An ClassCastException is thrown at runtime.
Vehiclecar" is printed.
"vehiclebike" is printed.
Rate this question:
1 and 2
1,2 and 3
2
3
Rate this question:
Public double methoda();
Public final double methoda();
Static void methoda(double d1)
All
Rate this question:
True true
False false
True false
False true
Rate this question:
Byte
String
Integer
Float
Rate this question:
Javac
Java
Javah
Javadoc
Rate this question:
Interface Base2 implements Base {}
Abstract class Class2 extends Base { public boolean m1() { return true; } }
Class Class2 implements Base {}
Abstract class Class2 implements Base { public boolean m1() { return (7 > 4); } }
Rate this question:
ToString()
Equals(Object obj)
Both toString() and equals(Object obj)
None
Rate this question:
Class
Interface
Both Class and Interface
Neither a and b
Rate this question:
Yes
No
Rate this question:
Heap and stack
Stringpool and heap
Heap
Stack
Rate this question:
Integer
Float
String
Byte
Rate this question:
Compilation error
One
Two
Null
Rate this question:
Can be only changed before jvms starts
Can be only changed dynamically
Heap memory configuartion cannot be changed
None
Rate this question:
Value1
Comiplation error
Runtime Error
None
Rate this question:
ToString()
HashCode()
Equals(Object obj)
None
Rate this question:
Each new object has its own distinctive set of instance variables
Each object has a copy of the instance variables of its class
The instance variable of each object are seperate from the variables of other objects
The instance variables of each object are stored together with the variables of other objects
Rate this question:
Compilation error
ABC
Abc
RuntimeError
Rate this question:
Quiz Review Timeline (Updated): Mar 20, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.