Question: java What is the output of the following program? public class Microwave private int price: public void setprice(int pXprice=p:) public int getprice(/{return price) public void

java java What is the output of the following program? public class Microwave

What is the output of the following program? public class Microwave private int price: public void setprice(int pXprice=p:) public int getprice(/{return price) public void printinfo/ {System.out.println(price);}} public class Microwavetest{ public static void main(String[] args) Microwave M1=new Microwave(): M1.price=3000: M1.printinfo(); }} O 3000 O Error O 2000 O 5000

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!