Sorry but null is not a String. However, System.out.println does print the string "null" whenever a null reference is passed.
From
JLS 3.10.7 The Null Literal
The null type has one value, the null reference, represented by the literal null, which is formed from ASCII characters. A null literal is always of the null type.
As far as I know, String is not the null type :roll:
literal does not always mean "String", there are character literals ('a', 'b', ...), integer literals (1,2,3,...), float literals (1.2f,...), etc.
From
JLS 3.10 Literals
A literal is the source code representation of a value of a primitive type, the String type, or the null type.
[ July 31, 2002: Message edited by: Valentin Crettaz ]