Unit 5 Flashcards

(6 cards)

1
Q

What are static methods?

A

Behaviors we can access without creating an object

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

What are non-static methods?

A

Behaviors that can only be accessed after an object is created

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

What do class variables do?

A
  • Have a variable be changed every time its used
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you write getters?

A

public class getShit() {
return shit;
}

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

When can this be used?

A
  • non-static methods
  • constructors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does this mean?

A
  • The private variables used in a class
How well did you know this?
1
Not at all
2
3
4
5
Perfectly