For the class Team declared below write the method for the f

For the class \'Team\' declared below, write the method for the following constructors Public class Team {String teamName; String teamCity;} A constructor that sets both the teamName & teamCity member variables: The default constructor.

Solution

a) public Team(String teamName, String teamCity) // constructor name is class name

b) public Team(){ }

 For the class \'Team\' declared below, write the method for the following constructors Public class Team {String teamName; String teamCity;} A constructor that

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site