This Core Java Questions: Quiz! Exam assesses understanding of Java constructors, annotations, and their properties. It's designed for learners to test their knowledge on fundamental Java concepts, enhancing their ability to develop Java applications effectively.
Abstract classes cannot have constructors
Default Constructors are Optional for all classes
can be overloaded across inherited classes
Default Constructors are optional only for the classes that does not have constructors
Rate this question:
Interface
Annotate
Annotation
Meta
Metadata
Rate this question:
2,3,4
1,2,3
3,4,5
1,2,5
1,3,4
Rate this question:
Java.lang.Annotation
Java.lang.annotation.Annotation
Java.annotation.Annotation
There is no super type for an Annotation type. An Annotation type is just an interface definition
Rate this question:
An annotation is a special kind of modifier
An annotation can be declared at public, private, protected and package access levels
Annotation methods allow wrapper types as its return types, as an alternative to its equivalent primitive types
Annotations can replace interfaces in Java
Rate this question:
Statement B is True and Statement A is false
Both the Statements A and B are false
Statement A is True and Statement B is false
Both the Statements A and B are true
2-A, 3-B, 4-C, 1-D
1-A, 2-B, 3-C, 4-D
1-A, 3-B, 4-C, 2-D
2-A, 4-B, 3-C, 1-D
Rate this question:
2,3
1,2
4,5
2,4
1,5
Rate this question:
Linked list
Hash set
Array list
Hash map
Rate this question:
Hash map
Hash set
Queue
Stack
Array list
Rate this question:
Remover
Enumerator
Enumeration
Iterator
Comaprator
Rate this question:
Consider the following scenario: The Employee objects are populated in an ArrayList in order to show it to the user. The User Interface is designed in such a way to display one record at a time. Appropriate buttons are provided to browse through the previous and next records. Which of the following option gives the correct interface that helps to accomplish the above task?{ Consider the following scenario: The Employee objects are populated in an ArrayList in order to show it to the user. The User Interface is designed in such a way to display one record at a time. Appropriate buttons are provided to browse through the previous and next records. Which of the following option gives the correct interface that helps to accomplish the above task?{ List Iterator
Enumerator
Iterator
Enumeration
Browser
Rate this question:
Java.util.Calendar
Java.util.date
Java.util.dat & java.util.time
Java.util.timestamp
Rate this question:
Java.util.Calendar
Java.util.Time
Java.util.Date
Java.util.Timestamp
Rate this question:
Declaration 2,4
Declaration 1,3,4
~Declaration 1,2,3
~Declaration 2,3,4
Rate this question:
The program will output numbers 1 to 5 in ascending order.
The program will output numbers 1 to 5 in any order.
The program may throw a runtime exception due to concurrent access.
The output can include repeated numbers among 1 to 5.
Rate this question:
Has-a relationships always rely on inheritance
Has-a relationships always rely on instance variables
Has-a relationships always require at least two class types
Has-a relationships always rely on polymorphism
Rate this question:
Compilation error at line 9
10,20
20,10
Compilation error at 4th line
Rate this question:
Addition returns integer
Runtime error at line 12
Addition method returns nothin
Compilation error at line 5
Rate this question:
Public void getNum(double d) { }
Public void getNum() { }
Public float getNum() { return 4.0f; }
Public double getNum(float d) { return 4.0d; }
Rate this question:
All sub class types of exceptions that come under java.lang.RuntimeException, if not handled inside a method should be declared using throws keyword
All sub class types of errors that come under java.lang.Error, if not handled inside a method should be declared using throws keyword
All sub class types of java.lang.Throwable, if not handled inside a method should be declared using throws keyword
All sub class types of exceptions that come under java.lang.Exception, if not handled inside a method should be declared using throws keyword
None of the listed options
The overriding method cannot declare additional exceptions which is not declared in its super class version.
~When a method in the super class is declared to throw a Checked Exception, the overriding method in the sub class should also declare the same.
The overriding methods cannot declare to throw the Super Class types of those exceptions declared in the super class methods
The overriding method cannot re-declare the Unchecked exceptions, that are declared by super class method.
Rate this question:
3,4
1,2
2,3
1,3
Rate this question:
3,4
3,5
4,5
1,2
Rate this question:
3,4,5
1,2,3
2,3,4
1,3,5
Rate this question:
Run time Error
Prints "Previous Exception
~Prints "Last Exception
Compile Time Error
Rate this question:
1,2,3
2,3,4
1,2,4
1,2,5
1,2 only
Rate this question:
3,4
1,2
2,3
3,5
1,5
Rate this question:
1,4,5
2,3
1,5
1,2,3
2,3,4
Quiz Review Timeline (Updated): May 15, 2024 +
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.