This is a busy question.
Unfortunately, a good (or bad) design is 100% dependent on how it will be used.
It is generally recommended that you keep member variables private so that the object model controls their access. This means that the first approach is better.
BUT
if the values never change, what point? Why write screenwriters if they will never be used?
, ? , , . , . , "".
, , , :
public class Student{
private final String name;
private final String id;
public Student(String name, String id){
this.name = name;
this.id = id;
}
... getters ONLY for both fields
, , " " . , , - , .