com/codegym/task/task02/task0202/Solution.java:16: error: illegal start of expression
public static class person {
^
why it's wrong the public class person?why? level 2 lesson 2
Discussione in corso
Commenti (4)
- Popolari
- Nuovi
- Vecchi
Devi avere effettuato l'accesso per lasciare un commento
Pina
27 gennaio, 17:44
+1
Thomas
27 gennaio, 17:51
in your case... the containing method is taking care of visibility. So the visibility modifier for your class does either not work or possibly break the methods visibility. So it isn't allowed in the first place. Don't bother to much with that and wait till ~lvl. 25 to learn more about that matter
+1
Thomas
27 gennaio, 17:56
And here how it probably should look like
0
Thomas
27 gennaio, 17:39
post the entire content of Solution.java
if you try to declare a second top level public class in the Solution.java file, then this is not possible. Also a top level class can not be static. If you declare a static inner class then make sure it is inside of the Solution class' parenthesis.
0