• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Default values

 
geet kaur
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
guys i have a problem in this code....see both the print statements are giving the same result...shouldnt't the instance variables be assigned their default values first???please help..
 
Henry Wong
author
Marshal
Pie
Posts: 21431
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This line prints the parameters to the constructor -- not the instance variables.

Henry
 
geet kaur
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh i got it ...thanks!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic