CODEclass 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
Post a Comment