A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
video training course this week in the
Joined: Aug 03, 2006
May 25, 2007 00:42:00
what are the similarities between constructor and method.
Joined: Oct 13, 2005
May 25, 2007 01:56:00
1: Both can have the same access modifiers.
2: Both can have an argument list, in the same format.
3: Both contain statements.
4: Each can be mistaken for the other
You can't call a contructor the way you call a method and you can't call a method the way you call a constructor.
I agree. Here's the link:
Regarding static factory method and constructor
Whats the Difference
differnce between constructor and method
Diffence between constructor overloading and method overloading
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015