The equivalent in Java to a struct would be
class Member
{
public String FirstName;
public String LastName;
public int BirthYear;
};
and there's nothing wrong with that in the right circumstances. Much the same as in C++ really in terms of when do you use struct verses when do you use a class with encapsulated data.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…