Coding Rules Flashcards

1
Q

Print()

PrintIn()

A

Print()&raquo_space; will print on same line

PrintIn()&raquo_space; prints on new line

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to get an output?

A

System.out._____

I.e System.out.printIn();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to comment?

Multiple line comment?

A

//
/_____
_______
_______
/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to start code?

A

Need class and a main method !!!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Set up in Java

A

Class _____ {
Public static void main() {

   } }
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Scanner usage

A

To scan for inputs, detect error with input

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Scanner example

A

Scanner sc = new Scanner(system.in);

Sometime later call new input for sc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Class names start with

A

Capitols!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Method labelling

A

(parameters) {

       Method body

}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Return type

A

The data type of the value returned by the method.

“Void” if nothing is returned

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Parameters

A

Input values passed through method. Comma separated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly