Consider the following declarations:
public class XClass
{
private int u;
private double w;
public XClass()
{
}
public XClass(int a, double b)
{
}
public void func()
{
}
public void print()
{
}
}
XClass x = new XClass(10, 20.75);
Write a Java statement that creates the XClass object t and initializes
the instance variables of t to 20 and 35.0, respectively.
Comments
Leave a comment