Podcast
Questions and Answers
A Java program is a ______.
A Java program is a ______.
class
Every class has a ______ and the convention is that a class name starts with a capital letter.
Every class has a ______ and the convention is that a class name starts with a capital letter.
name
The simple programs that we are starting with will only contain one ______.
The simple programs that we are starting with will only contain one ______.
class
Every opening curly bracket must have an associated ______ bracket.
Every opening curly bracket must have an associated ______ bracket.
Java applications must have a method called ______, which is where execution of the program starts.
Java applications must have a method called ______, which is where execution of the program starts.
A method contains a collection of programming instructions that describe how to carry out a particular ______.
A method contains a collection of programming instructions that describe how to carry out a particular ______.
MS-DOS Analysis of “Hello World” program The rest of this line is beyond your ______ as of yet;
MS-DOS Analysis of “Hello World” program The rest of this line is beyond your ______ as of yet;
A program starts with the first instruction of main, then obeys each instruction in ______
A program starts with the first instruction of main, then obeys each instruction in ______
The program terminates when it has finished obeying the final instruction of ______
The program terminates when it has finished obeying the final instruction of ______
This now brings us to the important part the line of code that represent our instruction display “Hello World” System.out.print(“Hello World”); To get anything printed to the screen we use ______ and put whatever we want to be displayed in the brackets
This now brings us to the important part the line of code that represent our instruction display “Hello World” System.out.print(“Hello World”); To get anything printed to the screen we use ______ and put whatever we want to be displayed in the brackets
A sequence of characters enclosed in double quotes as above is known as a ______
A sequence of characters enclosed in double quotes as above is known as a ______
We can also use another print statement which is println println is short for print line and the effect of using this statement compared to print is to start a new line after displaying whatever is in the ______
We can also use another print statement which is println println is short for print line and the effect of using this statement compared to print is to start a new line after displaying whatever is in the ______
Note the semi-colon (;) at the end of the print statement We must include a semi-colon at the end of every instruction we write in Java to indicate that it is a ______
Note the semi-colon (;) at the end of the print statement We must include a semi-colon at the end of every instruction we write in Java to indicate that it is a ______
Compile time error (syntax error) – Violation of the programming language rules – Detected by the compiler – ______
Compile time error (syntax error) – Violation of the programming language rules – Detected by the compiler – ______
Errors Run time error (logic error) – Causes program to perform action programmer did not intend – System.out.println("Hello Word"); Program will still compile and run but will print Hello Word instead of ______
Errors Run time error (logic error) – Causes program to perform action programmer did not intend – System.out.println("Hello Word"); Program will still compile and run but will print Hello Word instead of ______
Comments are lines written by the programmer that convey some type of information concerning the code such as filenames, titles or explanations of what the code is ______
Comments are lines written by the programmer that convey some type of information concerning the code such as filenames, titles or explanations of what the code is ______