Can someone tell me where did I go wrong.it isn't executing..ND also tell the reason as to y it is not executing. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Can someone tell me where did I go wrong.it isn't executing..ND also tell the reason as to y it is not executing.

https://code.sololearn.com/c4xpCs0wPqkb/?ref=app

1st Sep 2019, 6:56 AM
Nikita Sharma
Nikita Sharma - avatar
2 Answers
+ 3
the main methode is in the class you making a object from
1st Sep 2019, 7:25 AM
Cat Sauce
Cat Sauce - avatar
+ 2
This, in principle, functions: https://code.sololearn.com/ce0iC2e0T1Jd/?ref=app About swapping, well, you choosed just a language that passes everything by value, not by referente. One way is to emulate a reference class: https://stackoverflow.com/questions/5614562/how-to-do-the-equivalent-of-pass-by-reference-for-primitives-in-java/5614650#5614650
1st Sep 2019, 7:51 AM
Paolo De Nictolis
Paolo De Nictolis - avatar