Results 1 to 1 of 1
-
Differences between constructor and method
Following are the differences between constructor and method.
- Constructor does not have a return type.
- Constructor does not have a return statement in its body.
- Name of constructor is the same as that of class in which it is declared.
Java Code:public class ClassA { public ClassA(){ } }
Similar Threads
-
Calling constructor of parent class from a constructor
By Java Tip in forum Java TipReplies: 0Last Post: 12-19-2007, 09:10 AM -
Calling constructor of same class from a constructor
By Java Tip in forum Java TipReplies: 0Last Post: 12-19-2007, 09:01 AM -
differences: AWT and Swing
By baltimore in forum AWT / SwingReplies: 1Last Post: 08-06-2007, 09:01 AM -
differences between 2 dates
By cecily in forum New To JavaReplies: 1Last Post: 08-02-2007, 05:37 PM -
Java constructor method
By carl in forum New To JavaReplies: 2Last Post: 07-31-2007, 02:15 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks