Understanding on the task :- The static variable applePrice Line 17 has been accessed by the class name Apple.applePrice at Line no 22 Line 16 Apple Class method addPrice() also static Line 19 2 objects of the Apple class Line 9 apple and Line 11 apple2 which is calling the static addprice () method of Apple Class Line 10 and 12 respectively. The static addPrice(int applePrice ) method having int applePrice as argument which is local variable for this method it will not return the calculated price to main() method as it is void. I have called the static variable applePrice using class name as Apple.ApplePrice assin it the cost of both the apples through object as:- Apple.applePrice=apple.applePrice+apple2.applePrice; also tried Apple.applePrice=this.applePrice+applePrice;