main - p ublic class Main cfw_ public static void main (...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
public class Main { public static void main (String [] args) { System.out.println ( "Hello world!" ); } }
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
public final class Main { public static void main ( final String . .. args) System.out.println ( "Hello world!" ); } }
Background image of page 2
I access modifier for things with unrestricted access; one public, top-level Java class per file I keyword intruducing a Java class I name of class; capitalized by convention; should be same a file name I access modifier for methods with unrestricted access; method main must be public if it is to be the starting point of the program by the Java virtual machine I method modifier indication a non-instance method I return type of void means the method does not return a value;
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

main - p ublic class Main cfw_ public static void main (...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online