Hi,

I notice the example code produce this output:
30000
person1.getName() = Sang Shin, person1.computeTotalWealth() = 30000,
person1.measureIntelligence() = 50
30000
personinterface1.getName() = Sang Shin,
personinterface1.computeTotalWealth() = 30000

looking at the code, I can't figure out why 30000 is printer as first
line:

        System.out.println("person1.getName() = " + person1.getName()
+ "," +
                " person1.computeTotalWealth() = " +
person1.computeTotalWealth() + "," +
                " person1.measureIntelligence() = " +
person1.measureIntelligence(person1.getName()));

        System.out.println("personinterface1.getName() = " +
personinterface1.getName() + "," +
                " personinterface1.computeTotalWealth() = " +
personinterface1.computeTotalWealth());



which i believe the 30000 come from the println() statement in
computeTotalWealth(), just why it appear as first?

    public int computeTotalWealth(){
        System.out.println((cashSaving + retirementFund));;
        return (cashSaving + retirementFund);
    }

Regards
KC

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to