DOWNLOAD

Get our toolbar!

Saturday, 30 April 2011

// write a program in java which initialize the object of class through parameterized constructor.

CODE


class a
{
a( )
{
System.out.println("In a\'s Contructor...");
}
}
class b extends a
{
b(String s)
{
System.out.println("In b\'s constructor...");
System.out.println(s);
}
}
public class par
{
public static void main(String [ ]args)
{
b obj=new b("Hello from java!");
}
}

OUTPUT DISPLAY



0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More