0
import java.awt.Rectangle;
public class IONS {
public static void main(String[] args) {
Rectangle x = new Rectangle(10, 20);
int width = x.width();
System.out.println(width);
}
}
Une erreur est survenue à la ligne 7 lors de la compilation, où est-ce que je vais mal?La méthode width() n'est pas définie pour le type Rectangle
ERROR: The method width() is undefined for the type Rectangle IONS.java