View Single Post
  #2 (permalink)  
Old 11-29-2007, 11:17 PM
hardwired hardwired is offline
Senior Member
 
Join Date: Jul 2007
Posts: 1,222
hardwired is on a distinguished road
Code:
class Pet { // a field called name that is of type String String name; public Pet(String petsName) { // assignment statement so that the name field // will be initialized with the value of the // constructor’s parameter name = petsName; } }
Reply With Quote