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);
Q1. How many members does class XClass have?
Q2. How many private members does class XClass have?
Q3. How many constructors does class XClass have?
Q4. write the definition of the member func so that u is set to 10 and w is set to 15.3?
Q5. write the definition of member print that prints the contents of u and w?
Q6. write the definition of the default constructor of class XClass so that the instance variables are initialised?
Q7. write the definition of the Xclass constructor that takes two parameters so that u is initalised to a and w is initalised to b?
Q8. write a java statement that prints the values of the instance variable of x?
Q9. write a java statement that creates the XClass object t and initalises the instance variables of 1 to 20 and 35.0 respectively.