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 versus when do you use a class with encapsulated data.