User 클래스
public class User { private int userNo; private String id; private String email; public User(int userNo, String id, String email) { super(); this.userNo = userNo; this.id = id; this.email = email; } @Override public String toString() { return "User [userNo=" + userNo + ", id=" + id + ", email=" + email + "]"; } }
Main 클래스
public class Main { public static void main(String[] args) { User user = new User(1, "admin", "admin@naver.com"); System.out.println(user); } }