Plz help me resolve error in my code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Plz help me resolve error in my code

https://code.sololearn.com/ca7a3A2248a2

1st Jun 2021, 2:51 PM
Jagadeesh Gurana
Jagadeesh Gurana - avatar
3 Answers
+ 3
Remove the first line (the package) Then either put "static" between public and class at class Cust. Or move the definition of class Cust outside the class Customer.
1st Jun 2021, 3:15 PM
Hape
Hape - avatar
+ 2
JaguaR , write class Cust separately. Look at the code. https://code.sololearn.com/cnvlW0pJW0LL/?ref=app
1st Jun 2021, 3:14 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 1
Hape If you make class static then class members should also be static so it is not better solution. Making seperate class is better solution.
1st Jun 2021, 3:35 PM
A͢J
A͢J - avatar