Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

All natural language sentences must follow generally accepted punctuation rules. It also means that every sentence must end with dot (.), exclamation point (!) or question mark (?) depending on a sentence semanticsemantics. This requirement applies to:

...

Based on this statement there are limited uses cases where var keyword is allowed. The var keyword is allowed only in cases where a right part of an assignment expression contains an explicit type of variable, that is for assignments of literals and the result of constructor invocation.

Allowed only for assignments of literals and , result of constructor invocation and explicit casts:

Code Block
languagejava
var i = 42;
var l = 42L;
var s = "Hello";
var list = new ArrayList<Integer>();
var t = (long) l;


Disallowed for all other cases:

...