Wednesday, January 11, 2012

Can a method call for a contrcutor (JAVA)?

You cannot call constructor directly--have to use "new" keyword. A constructor is use to create an instance of that cl. Even Table() and calculatePrice() have the same parameters, you cannot merge them. They serve different purposes.

0 comments:

Post a Comment