|
No. |
Answer/Output |
|
1 |
In the Boolean constructor if the string contains any word other than true or if
the reference is null, then then the new instance will contain the value false. |
|
2 |
NaN is the only value that is not equal to itself.. |
|
3 |
Boolean.TRUE returns the Boolean type but not the primitive boolean type.. |
|
4 |
Integer.MIN_VALUE = 0x80000000 |
|
5 |
Integer.MAX_VALUE = 0x7fffffff |
|
6 |
Instance member of a static inner class cannot be referenced using the class name
of static inner class. |
|
7 |
An anonymous class cannot be declared public, private, protected but it can extend
an abstract class. |
|
8 |
Integer.MAX_VALUE = Integer.MIN_VALUE |
|
9 |
Primitive type variables cannot be compared with a reference value using = =. |
|
10 |
Methods marked native cannot have a method body. |
|
11 |
If main method is declared with private or default access modifier it will compile
but while running, it states that main method is not public. |
|
12 |
Error, Exception, Throwable and RuntimeException can be thrown using throw statement. |
|
13 |
Calling wait method on an object or calling the setPriority method on a thread
object can directly cause a thread to stop executing. |
|
14 |
Any statement that may throw a RuntimeException need not be enclosed in a try block. |
|
15 |
Any statement that may throw an exception must be enclosed in a try block. |
|
16 |
Vector and Hashtable are thread safe (Synchronized). |
|
17 |
ArrayList and HashMap are unsynchronized and must be wrapped via Collections.SynchronizedList
or Collections.SynchronizedMap if synchronization is desired. |
|
18 |
main() method can be overloaded and it won't give compilation error. |
|
19 |
We cannot add primitives to an Vector. |
|
20 |
Hexadecimal notations of 7 are:
0x7, 0X7, 0x07, 0X07 |
|
21 |
The default constructor initialized the instance variables declared in the class. |
|
22 |
If a Vector is created like new Vector(5,10); and if 6th element is added to the
vector, then the Vector grows in size to the capacity of 15 elements. |
|
23 |
Default value of char = '\u0000' |
|
24 |
Default value of long = 0L |
|
25 |
Default value of float = 0.0fF |