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
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.