+ 1

Program that uses different types of constructors. Icant understand what is the mistake?

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

17th Jul 2022, 2:17 AM
Ahmed Kazia
Ahmed Kazia - avatar
3 Respostas
+ 3
main method cannot be declared more than once the this keyword will not work in a static method keep the main method seperated from your student class. while it can work, it will be confusing.
17th Jul 2022, 3:39 AM
Apollo-Roboto
Apollo-Roboto - avatar
+ 3
The main method is used to define the starting point of the program. She must be in a different class than your other classes. You can create several constructors that have the name of your class with different properties. You should do something like this: https://code.sololearn.com/cuzvYR6jBlWT/?ref=app
17th Jul 2022, 8:30 AM
Roland
Roland - avatar
+ 1
Thanks
17th Jul 2022, 8:45 AM
Ahmed Kazia
Ahmed Kazia - avatar