package apples;
public class apples {
private String first;
private String last;
private static int members = 0;
public apples(String fn, String ln) {
first = fn;
last = ln;
members++;
System.out.printf("Contructor for %s %s, members in the club: %d\n", first, last, members);
}
}
package apples;
public class boy {
public static void main (String []args) {
apples member1 = new apples("Megan", "Fox");
apples member2 = new apples("Selana", "Gomez");
apples member3 = new apples("Taylor", "Swift");
}
}
Comments
Post a Comment