| Author |
constructor
|
charishma gottumukkula
Greenhorn
Joined: Nov 06, 2006
Posts: 20
|
|
|
Can we have parameterized constructor in java ?
|
 |
Eric Daly
Ranch Hand
Joined: Jul 11, 2006
Posts: 143
|
|
absolutely read up on sun's java tutorial you could start on this page and follow the "trail" to learn more about constructors with different parameter lists http://java.sun.com/docs/books/tutorial/java/javaOO/constructors.html
|
Studying for SCJP 6
|
 |
Henry Wong
author
Sheriff
Joined: Sep 28, 2004
Posts: 16695
|
|
Originally posted by charishma gottumukkula: Can we have parameterized constructor in java ?
If you mean parameters to the constructor, then as Eric pointed out, the answer is obviously yes. However, when you say "parameterized", do you mean parameterized types? Like so... The answer is yes. Java supports generics with constructors -- just like the support for generic methods. Henry
|
Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
|
 |
 |
|
|
subject: constructor
|
|
|