Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class tuna {
- private String first;
- private String last;
- private static int members = 0;
- public tuna(String firstname, String lastname){
- first = firstname;
- last = lastname;
- members++;
- System.out.printf("Constructor for %s %s, members in the club is %d\n", first, last, members);
- }
- public String getFirst(){
- return first;
- }
- public String getLast(){
- return last;
- }
- public static int getMembers(){
- return members;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement