Which type of file is named with a .java?
Source file
If I have a source file named Car.java, what should the class declaration look like?
public Car {
}
What is printed with
System.out.println("Hello");
System.out.println("World");?
Hello
World
Name the three types of errors/exceptions
- compile error
- runtime error
- logic error
What is a program?
A sequence of instructions and decisions.
Which type of file is named with a .class?
Class files
What does each class contain?
Methods
What is printed with
System.out.print("Hello");
System.out.println("World");
Hello World
Which type of error/exception will allow your code to compile and run?
Logic error
The programs that the computer executes.
What is javac?
Java compiler
What is needed for a class declaration?
- Class name
What is printed with System.out.print(5 + 7);?
12
What type of exception/error will not allow your code to compile?
Compile error
What is hardware?
The physical computer and peripheral devices
What is the jvm?
Java virtual machine
If I have a source file named Car.java, what will the compiled file be named?
Car.class
What is printed with System.out.print("3 * 4");?
3 * 4
Runtime error
What is a peripheral device?
A device that connects with the computer
Bytecode
How is the main method declaration written?
public static void main(String[] args){}
How would you print the following?
B
Y
E
System.out.println("B");
System.out.println("Y");
System.out.println("E");
What type of error/exception is created by this line of code?
System.out.println(1/0);
Run-time error (division by zero)
What are the two general types of storage?
- primary storage/memory
- secondary storage