X616: Objects of a Class Exercise 3

Which lines contain the constructor?

public class Test() {

  private final int SHIRTS = 24;
  private int numPants= 14;
  private int tanks =0;

  public Test(int blueJeans, int tankTops) {
    tanks = tanks + tankTops;
    numPants = blueJeans+ numPants;
  }
}//end of class

Your Answer:

Select one answer:


Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.