Coding Rules Flashcards
Print()
PrintIn()
Print()»_space; will print on same line
PrintIn()»_space; prints on new line
How to get an output?
System.out._____
I.e System.out.printIn();
How to comment?
Multiple line comment?
//
/_____
_______
_______/
How to start code?
Need class and a main method !!!
Set up in Java
Class _____ {
Public static void main() {
} }
Scanner usage
To scan for inputs, detect error with input
Scanner example
Scanner sc = new Scanner(system.in);
Sometime later call new input for sc
Class names start with
Capitols!
Method labelling
(parameters) {
Method body
}
Return type
The data type of the value returned by the method.
“Void” if nothing is returned
Parameters
Input values passed through method. Comma separated