Find the error:
system.out.println("Hello world!");
System needs to be capitalised
What kind of programming language is java?
High-level, object oriented
What is it called between curly braces in code?
public static void main(String[] args) {
System.out.println("Hello world!");
}
Block of code
What is the Scanner import statement
import java.util.Scanner
Find the error:
String sum, totalGrade;
Variable types int or double are made for these kinds of data, not String
Text (strings of text that can include letters, numbers, and symbols)
Semicolon (;)
How do you recognise user input is needed on an assignment?
Green text in the example code
Find the error:
class Main {
public static void main(String[] args) {
Int birthYear, age;
}
}
int should not have a capital
.java
Where do imports go?
How would you declare this variable:
age
int age;
An IDE is
Integrated Development Environment
What is the entry point of code?
Main method
keyboard.close();
Fine the error:
class Main {
public static void main(String[] args) {
System.out.println(" Hello world! ");
}
Need one more bracket to close out block from "class Main { "
A class file is produced even with a sentax error (true/false)
false
What concatenates pieces of code?
+
What do we name the Scanner as in this class?
keyboard