File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- /**
2- * Example program that demonstrates print vs println.
3- */
41public class Goodbye {
52
6- /**
7- * Prints a greeting.
8- */
93 public static void main (String [] args ) {
10- System .out .print ("Goodbye, " ); // note the space
4+ System .out .print ("Goodbye, " );
115 System .out .println ("cruel world" );
126 }
137
Original file line number Diff line number Diff line change 1+ public class Hello2 {
2+
3+ public static void main (String [] args ) {
4+ // generate some simple output
5+ System .out .println ("Hello, World!" ); // first line
6+ System .out .println ("How are you?" ); // another line
7+ }
8+
9+ }
Original file line number Diff line number Diff line change 1+ public class Hello3 {
2+
3+ public static void main (String [] args ) {
4+ System .out .print ("Hello!\n How are you doing?\n " );
5+ System .out .println ("She said \" Hello!\" to me." );
6+ }
7+
8+ }
You can’t perform that action at this time.
0 commit comments