+ 1
Program that uses different types of constructors. Icant understand what is the mistake?
3 ответов
+ 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.
+ 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
+ 1
Thanks