Prints: T1T2T2
Prints: T1T2T3
Prints: T1T1T2
Prints: T1T1T3
Prints: T1T1T1
DateFormat df = new SimpleDateFormat("dd/MM/yyyy");try {Date d = df.parse(dob);} catch(ParseException pe) { }
GregorianCalendar g = new GregorianCalendar(dob);Date d = g.getDate();
Calendar c = new Calendar(dob);Date d = g.getDate();
Date d = new Date(dob);
CalendarFormat cf = newSimpleCalendarFormat("dd/MM/yyyy");try {Date d = cf.parse(dob);} catch(ParseException pe) { }
Compile-time error: Wrapper types cannot be comparedusing equals
Compile-time error: Integer wrapper cannot accept char type
Prints: equals
Prints: EQ
Prints: equals EQ
Transforms s1 into the union of s1 and s2
Transforms s1 into the (asymmetric) set difference of s1 ands2
Transforms s1 into the intersection of s1 and s2.
Copies elements from s2 to s1
Returns true if s2 is a subset of s1
Public void run()
Public void start()
Public void stop()
Public void suspend()
CharAt(13)
CharAt(15)
CharAt(12)
CharAt(16)
CharAt(14)
HelloolleH55
HelloolleH44
HelloHello44
HelloHello33
HelloHello55
Inheritance enables adding new features and functionality toan existing class without modifying the existing class
In an inheritance hierarchy, a superclass can also act as a subclass
Inheritance is a kind of Encapsulation
Inheritance does not allow sharing data and methods amongmultiple classes
In an inheritance hierarchy, a subclass can also act as a superclass
Welcome Planet
The code runs with no output
Compilation fails
Welcome 5
Welcome Planet 5
Inheritance
Polymorphism
Persistence
Aggregation
Association
Reads the text from keyboard and prints the same to theconsole on pressing Ctrl Z, flushes (erases) the same from theconsole.
Reads the text from keyboard character by character andprints the same to the console on typing every character.
Reads the text from keyboard line by line and prints the sameto the console on pressing ENTER key at the end of every line
Reads the text from keyboard line by line and prints the sameto the console on pressing ENTER key at the end of every line,then the same is flushed (erased) from the console.
Reads the text from keyboard and prints the same to theconsole on pressing Ctrl Z
True
False
NavigableSet
Deque
NavigableMap
NavigableList
Labeled continue
Labeled goto
Labeled throw
Labeled catch
Labeled break
Compile-time error
Runtime Error
NO
False
True
To call the join() method, a thread must own the lock of theobject on which the call is to be made
To call the yield() method, a thread must own the lock of theobject on which the call is to be made.
To call the wait() method, a thread must own the lock of theobject on which the call is to be made.
To call the wait() method, a thread must own the lock of thecurrent thread.
To call the sleep() method, a thread must own the lock of theobject which the call is to be made.
True
False
If (x != y[0].toString()) {
If (x & y[0]) {
If (x.equals(y[0])) {
If (!x.equals(y[0])) {
Greek f = (Beta)(Alpha)x;
Alpha a = x;
Greek f = (Alpha)x;
Beta b = (Beta)(Alpha)x;
Greek f = (Delta)x;
Welcome Planet
Compilation Error
Compiles and Executes with no output
Planet
Planet Welcome
Beta has-a Gamma and Gamma is-a Alpha.
Gamma has-a Beta and Gamma is-a Alpha
Alpha is-a Gamma and has-a Beta.
Gamma is-a Beta and has-a Alpha.
Alpha has-a Beta and Alpha is-a Gamma.
Cloneable interface
Serializable interface
Readable interface
Externalizable interface
Writable interface
Public class Test2 {static public void main(String[] in) {System.out.println("Test2");}}
Public class Test4 {static int main(String args[]) {System.out.println("Test4");}}
Public class Test1 {public static void main() {System.out.println("Test1");}}
Public class Test3 {public static void main(String args) {System.out.println("Test3");}}
Public class Test5 {static void main(String[] data) {System.out.println("Test5");}}
Welcomeclass two
Throws a compile time exception as overridden method a()does not throw exception smile
Class two
Throws a compile time exception as overridden method z()does not throw exception smile
Two
Author(name = "Deepak",date = "02/04/2008")class MyClass() { }
@Author(name = "Deepak",)class MyClass() { }
@Author("Deepak","02/04/2008")class MyClass() { }
SELECT * BULK COLLECT INTO emp_details_t from emp;
@Author(name = "Deepak",date = "02/04/2008")class MyClass() { }
Prints: 1, true
Prints 2, false
Prints: 2, true
Prints: 1, false
ArrayList< Double > a = new ArrayList < Double >();
ArrayList< Integer > a = new ArrayList< Double >();
ArrayList< WrapperType > a = new ArrayList< WrapperType >();
ArrayList< Number > a = new ArrayList< Number >();
ArrayList< Integer > a = new ArrayList< Integer >();
Throws a Runtime error 'Illegal forward reference'
1000
Compiler complains about forward referencing of membervariables first and second
Compiler complains about private memebers is notaccessible from main() method
Node1.node = new Node();
Node1 = null;
Node1.node = null;
Node1 = node1.node;
Node1 = new Node();
Color treeColor = Color.GREEN;
Color purple = new Color( 0xff00ff);
Color skyColor = BLUE;
If( RED.getRGB() < BLUE.getRGB() ) {}
If( Color.RED.ordinal() < Color.BLUE.ordinal() ) {}
To automatically delete objects from a container as soonclients stop referencing them
To allow clean up after finalization but before the space isreclaimed
To keep objects alive provided there is enough memory
To keep objects alive only while they are in use (reachable) byclients
Annotations are not part of a program.
Annotations are predefined classes.
Annotations are data about program.
Annotations are static methods.
ToString()
CompareTo(Object)
HashCode()
Equals(Object)
Run()
Prints: 21 21
Prints: 20 21
Compilation Error: Non-static method methodB() cannot be referenced from static context methodA()
Prints: 20 20
Prints: 21 20
Default (blank), that is, the method declaration would readvoid setWidth( int n )
Final
Private
Protected
Public
Public class Circle extends Shape {private int radius;public void setRadius(int radius) { this.radius = radius; }public int getRadius() { return radius; }public void draw() {/* code here */}}
Public class Circle extends Shape {private int radius;public void draw();}
Public abstract class Circle extends Shape {private int radius;}
Public class Circle implements Shape {private int radius;}
Public class Circle extends Shape {public int radius;private void draw() {/* code here */}}
All exceptions are thrown programmatically from the code or API
All exceptions are thrown by JVM
JVM cannot throw user-defined exceptions
JVM thrown exceptions can be thrown programmatically
All RuntimeException are thrown by JVM
Runtime Error "IllegalThreadStateException"
Prints the following output 2 times: Planet(waits for 1000 milli seconds)Earth
Compile-time Error
Prints the following output 1 time: Planet(waits for 1000 milli seconds)Earth
Prints the following output:PlanetPlanet(get into long wait. Never ends)
Since widgetCount is private, only methods in the Widgetclass can access it.
If another class tries to access widgetCount, a runtimeexception will be thrown.
Since widgetCount is private, only the addWidget method canaccess it.
Since widgetCount is private, only methods in the Widgetclass and any derived classes can access it.
Null pointer exceptionCatchable caughtnull pointer exception
Runtime error
Catchable caughtnull pointer exceptionnull pointer exception
Compile-time error
Null pointer exceptionnull pointer exceptionCatchable caught
Container.setComponent(component); component=newComponent(); component.setParam(100);
Component = new Component(); component.setParam(100);container.setComponent(component);
Component.setParam(100);
Component = new Component(); component.setParam(100);
Container.getComponent().setParam(100);
SQLWarning is the subclass of SQLException
SQLWarning and SQLException can be used interchangeably
SQLWarning affects the normal program execution
SQLWarning messages are accessible through the Statementobject
SQLWarning can be caught and handled using try-catch
Public void eatMe() throws BitterException, SourException
Public void eatMe() throws Throwable
Public void eatMe() throw BadTasteException
Public void eatMe() throws BadTasteException
Public void eatMe() throws RuntimeException
Quiz Review Timeline (Updated): Jul 30, 2011 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
SuiteBuilder Pre-Session Assessment Quiz | Custom Fields
This pre-session assessment quiz covers Custom Fields in SuiteBuilder, focusing on their application, types, and limitations within business software environments.
Questions:
10 |
Attempts:
27 |
Last updated:
Apr 07, 2023
|
Zoom Quiz Questions And Answers
Are you a frequent user of the Zoom app? If yes, then take this " Zoom Quiz Questions And Answers quiz" to find out some interesting facts about the application....
Questions:
15 |
Attempts:
2485 |
Last updated:
Jul 17, 2023
|
GIT & GitHub Quiz
This is an MCQ quiz to test the basics and essentials of Git & GitHub. Do you think you can pass this GIT & GitHub quiz? Git is a free and open-source software that is for...
Questions:
15 |
Attempts:
9635 |
Last updated:
Feb 13, 2024
|
The Facebook Messenger Quiz! Trivia
Do you know anything about Facebook Messenger? Do you suppose you could pass this quiz? The Facebook business manager is a free tool developed by Facebook to permit businesses...
Questions:
10 |
Attempts:
282 |
Last updated:
Mar 19, 2023
|
Ranorex Certification Trivia Quiz
Ranorex helps with automated testing, and certification in Ranorex is a great way to enrich your CV. You also get benefits like access to a LinkedIn group exclusively for...
Questions:
10 |
Attempts:
474 |
Last updated:
Mar 22, 2023
|
SoapUI Software Trivia Quiz
An open-source web service testing application, SoapUI's functionality covers a wide range including but not limited to inspection, loads and compliance testing, mocking, etc....
Questions:
10 |
Attempts:
265 |
Last updated:
Mar 21, 2023
|
Wait!
Here's an interesting quiz for you.