Class Product{
Double price;
}
Public class Test{
Public void updetePrice(Product product ,double price) {
Price=price*2;
Product .price=product .price+price;
}
Public static void main(String [] arge) {
Product prt =new Product();
Prt.price=200;
Double newPrice=100;
Test t=new Test();
T.updetePrice(prt,newPrice);
System.out.println(prt.price+":"+newPrice);
}
}