Classes and Objects 02 Flashcards

1
Q

What is the purpose of the ‘static’ keyword?

A

The purpose of the static keyword is that it allows the use of a member without creating an instance of the class

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

What is the purpose of ‘get’ and ‘set’ methods?

A

Get methods retrieve a value from the class’s field.

set methods store a value in a field or change the value of a field in some way.

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