...
Question 10012 – Calculus
November 10, 2023
Question 5467 – NIELIT Junior Teachnical Assistant_2016_march
November 10, 2023
Question 10012 – Calculus
November 10, 2023
Question 5467 – NIELIT Junior Teachnical Assistant_2016_march
November 10, 2023

OOPS

Question 140
Is null an object?
A
yes
B
No
C
Sometimes yes
D
None of these
Question 140 Explanation: 
If null were an Object, it would support the methods of java.lang.Object such as equals().
However, this is not the case – any method invocation on a null results in a NullPointerException.
There is also a special null type, the type of the expression null, which has no name. Because the null type has no name, it is impossible to declare a variable of the null type or to cast to the null type. The null reference is the only possible value of an expression of null type. The null reference can always be cast to any reference type. In practice, the programmer can ignore the null type and just pretend that null is merely a special literal that can be of any reference type
Correct Answer: A
Question 140 Explanation: 
If null were an Object, it would support the methods of java.lang.Object such as equals().
However, this is not the case – any method invocation on a null results in a NullPointerException.
There is also a special null type, the type of the expression null, which has no name. Because the null type has no name, it is impossible to declare a variable of the null type or to cast to the null type. The null reference is the only possible value of an expression of null type. The null reference can always be cast to any reference type. In practice, the programmer can ignore the null type and just pretend that null is merely a special literal that can be of any reference type
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x