-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathQuestions.txt
More file actions
21 lines (20 loc) · 2.32 KB
/
Questions.txt
File metadata and controls
21 lines (20 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Which is a valid keyword in java?|||Interface|||String|||Float|||Unsigned|||1
You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?|||Public|||Private|||Transient|||Protected|||4
What is the prototype of the default constructor?|||Test()|||Test(void)|||public Test()|||public Test(void)|||3
Which class does not override the equals() and hashCode() methods, inheriting them directly from class Object?|||java.lang.String|||java.lang.Double|||java.lang.StringBuffer|||java.lang.Character|||3
Which is valid declaration of a float?|||float f = 1F;|||float f = 1.0;|||float f = "1";|||float f = 1.0d;|||1
What is the numerical range of char?|||0 to 32767|||0 to 65535|||-256 to 255|||-32768 to 32767|||2
What is the name of the method used to start a thread execution?|||init();|||start();|||run();|||resume();|||2
Which of the following will directly stop the execution of a Thread?|||wait()|||notify()|||notifyall()|||exits synchronized code|||1
Which will contain the body of the thread?|||run();|||start();|||stop();|||main();|||1
Which class or interface defines the wait(), notify(),and notifyAll() methods?|||object|||thread|||Runnable|||class|||1
Which of these standard collection classes implements a dynamic array?|||AbstractList|||LinkedList|||ArrayList|||AbstractSet|||3
Which of these keywords are used for the block to handle the exceptions generated by try block?|||try|||catch|||throw|||check|||2
String in Java is a?|||class|||object|||variable|||character array|||2
Which of these is necessary to specify at time of array initialization?|||Row|||Column|||Both Row and Column|||None|||1
Which of the following can be operands of arithmetic operators?|||Numeric|||Boolean|||Characters|||Both Numeric&Characters|||4
Who is Father of Java language?|||Bjarne Stroustrup|||James A. Gosling|||Dennis Ritchie|||Dr. E.F. Codd|||2
System class is defined in?|||java.util package|||java.lang package|||java.io package|||java.awt package|||2
In Java byte, short, int and long all of these are?|||signed|||unsigned|||Both of the above|||None|||1
The class at the top of exception class hierarchy is?|||ArithmeticException|||Throwable|||Object|||Exception|||2
Exception generated in try block is caught in which block?|||catch|||throw|||throws|||finally|||1