Writing Classes Flashcards

1
Q

initialize class

A

public class name {}
(indentation matters)

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

initialize variable in a class

A

private type name = value

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

initialize a method (no return value)

A

public void name() {}

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

initialize a method (return value)

A

public type name(parameter){}

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