Price of apples

  • 3
  • Locked
Calculate the total cost of apples. The total cost of apples corresponds to public static int applePrice.
You can't complete this task, because you're not signed in.
Comments (5)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Michaela Hrbková
Level 3 , Czech Republic
24 August, 07:03
Course never explained this, after paying I can see that the rest sucks
Albert ENG
Level 6
18 May, 10:22
I can not understand where line 20 takes its values from? values are in line 10 and 12 i would think i need to write Apple.applePrice = apple + apple2 The lesson before this task gives very little explanation, its been several hours i cant get it, browsing on the net, read and watched a lot but still how this code works is unclear for me, . How exactly addPrice method works and what does each line do i dont know :((((
Siyanda Dlamini
Level 7 , Durban, South Africa
26 February, 18:32
Why are you able to refer to the class itself without making an object out of it first.
Anonymous #10945102 Backend Developer
22 February, 11:19
If someone could explain how Apple.applePrice += applePrice; was the answer that would be great, i just cant seem to understand how the code was working on this problem?
Level 26 , San Diego, United States
19 September 2021, 01:07
See Help Section below in Code Gym. Good examples to understand Scope - Accessors - etc to go beyond solving; to better understanding why / how to solve logic where method accesses data (variable) in another Scope.