CS 112 Introduction to Programming - Yale University
CS 112 Introduction to Programming - Yale University
CS 112 Introduction to Programming - Yale University
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
A Simple Java Program<br />
public class Hello {<br />
public static void main(String[] args) {<br />
System.out.println("Hello, world!");<br />
System.out.println();<br />
System.out.println("This program produces");<br />
System.out.println("four lines of output");<br />
}<br />
}<br />
Program output (in red for emphasis):<br />
$ java Hello<br />
Hello, world!<br />
This program produces<br />
four lines of output<br />
$<br />
4