Computer Science, asked by meghasarthak6, 11 months ago

Example of null literal

Answers

Answered by Anonymous
3

Answer:

The null in Java is a literal of the null type. It cannot be cast to a primitive type such as int. float etc. but can be cast to a reference type

Answered by anshdeepcps
1

Answer:

String st =null

Explanation:

String st =null

null is a literal in java that cannot be assigned to primitive data types like int, float etc. , it can be used only for reference . it is not necessary that null is 0. Rather it refers to no value is present.

Similar questions