Calculate the total cost of apples.
The total cost of apples corresponds to public static int applePrice.
Price of apples
- 3
Locked
Comments (4)
- Popular
- New
- Old
You must be signed in to leave a comment
Albert ENG
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 :((((
0
Siyanda Dlamini
26 February, 18:32
Why are you able to refer to the class itself without making an object out of it first.
0
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?
0
Hoist
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.
https://codegym.cc/help/4839
0