Java Reference
In-Depth Information
What is wrong with the following class definitions?
class BClass AClass
{
private int w;
public void print()
{
System.out.println("u + v + w = " + (u + v + w));
}
public BClass()
{
super ();
w = 0;
}
public BClass( int x, int y, int z)
{
super (x, y);
w = z;
}
}
10. Consider the following statements:
public class YClass
{
private int a;
private int b;
public void one()
{
}
public void two( int x, int y)
{
}
public YClass()
{
}
}
class XClass extends YClass
{
private int z;
public void one()
{
}
public XClass()
{
}
}
Search WWH ::




Custom Search