| Author |
how to write constructor?
|
chanti kareti
Greenhorn
Joined: Mar 27, 2011
Posts: 1
|
|
array[0] = new MyClass();
array[1] = new MyClass(array[0]);
How can i write a constructor in MyClass, for above code. I required all the data in array[0] is have to copy in array[1].
|
 |
Mohamed Sanaulla
Bartender
Joined: Sep 08, 2007
Posts: 2927
|
|
Welcome to JR,
please TellTheDetails PostRealCode so that we can help you out. Also you can search for java tutorials on the basics on OOP in Java
|
Mohamed Sanaulla | My Blog
|
 |
Abubacker Siddik
Ranch Hand
Joined: Aug 12, 2009
Posts: 90
|
|
You want to create something like this??
|
 |
 |
|
|
subject: how to write constructor?
|
|
|