This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Default values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Default values" Watch "Default values" New topic
Author

Default values

geet kaur
Ranch Hand

Joined: Sep 03, 2008
Posts: 78
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
Sheriff

Joined: Sep 28, 2004
Posts: 18138
    
  39



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

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
geet kaur
Ranch Hand

Joined: Sep 03, 2008
Posts: 78
oh i got it ...thanks!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Default values
 
Similar Threads
Casting Difference of Float.POSITIVE_INFINITY
implementing interfaces
Tree creation problem
int to float conversion !
Increasing Array Size