+ 1
What is the main use of get() in java?
When to use it can anybody ans?
2 Respuestas
+ 1
the get() function is normally called a “getter”, and is used to get reference pointers to some data or field.
Getters have many context, the get() method in a list for example, is used to get the reference of an object at a certain index.
A getStudent() method in a class would represent a method to get the “Student”.