Java syntax: Difference between revisions

Content deleted Content added
m Static import declaration: tidy up code examples.
Line 323:
public class HelloWorld {
public static void main(String[] args) {
/* The following line is equivalent to:
System.out.println("Hi World!");
 
and would have been incorrect without the import declaration. */
out.println("Hello World!");
Line 361 ⟶ 360:
 
void shift() {
/* The following line is equivalent to:
 
if (foo == ColorName.RED) foo = ColorName.BLUE; */
if (foo == RED) foo = BLUE;