0
Cant seem to find the error
2 Réponses
0
It's telling you that it's with your imports. It may not be a library Sololearn's editor can support.
0
there is not standard package as
import javax.lang.*;
it can be
import javax.lang.model.*;
but you don't need it here
or
import java.lang..*; // without x
java.lang..* is imported automatically, so better solution is delete this line
// import javax.lang.*;
Second problem is that Sololearn doesn't support swing package and its
JOptionPane.showInputDialog()
in general it is not wrong in your code, but doesn't work on Sololearn.
you can use java.util.Scanner and .nextInt() instead