A. Programming theory
1. Basic Ideas
1(a) Delimiters are used as comments. The Phrase is put in there to be shown to the user whilst programming, but is not shown when the program is to run.
Those delimeters indicate comments, the compiler ignores what is inside.
1(b) “import java.io*;” means that the complier will check what libraries are necessary to compile the program, and it will simply import them. In this case, the program would not be able to run without the “import java.io*”, because the compiler will not find the “System.out.println” method
1(c) The asterisk (*) after io will be able to provide access to all the classes under the java.io package.
1(d) Class files are the result of a compiled .java file. An object is an instance of a class, created with the "new" keyword.
1(e) Public means that all methods in a package have access to the method.
1(f) The "main" method needs to be declared public static in order to compile.
1(g) Void means that the method does not return any value.
1(h) Main is a keyword that tells jave to begin program execution at that point.
1(i) The semi-colon is a statement terminator. This is needed in java for program statements.
1(j) Main is the name of the method but, the System.out.println() is a call to the java.io.* method println for displaying the words "Hello World"
2. Data Types
Whole (counting) numbers: Name Bytes of Storage taken up Range Example
2.1 int 4 -2,147,483,648 to +2,147,483,647 42
2.2 short 2 -32768 to 32767 66 2.3 byte 1 -128 to 127 100 2.4 long 8 -9223372036854775808 to 9223372036854775807 48933