Question: Consider the following declarations in Java: public class XClass { private int u; private double w; public XClass () { } public XClass ( int

Consider the following declarations in Java:

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);

a. How many members does class XClass have?

b. How many private members does class XClass have?

c. How many constructors does class XClass have?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!