Consider the following code and answer the questions that follow:
class vxl
{
int x,y;
void init(int a, int b )
{
x=a;
y=b;
}
public static void access( )
{
int a=50, b=100;
vxl vin=new vxl( );
System.out.println(“Object created”);
System.out.println(“I am X=”+vin.x);
System.out.println(“I am Y=”+vin.y);
vin.init(a,b );
System.out.println(“Function called”);
System.out.println(“I am X=”+vin.x);
System.out.println(“I am Y=”+vin.y);
}
}
a. What is the object name of the class vxl?
b. Name the local and instance variables of class.
c. What type of constructor is called in this program?
d. Name the user defined functions.
e. Write the output of the above program.
Answers
Answered by
0
Answer:
a.23
b.34
c you
d.tour
e.going tour
Similar questions