dimanche 31 août 2014

I'm learning IntroToCS using Java and something went wrong


Vote count:

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);

}


}


ERROR: The method width() is undefined for the type Rectangle IONS.java


There is an error in line 7 while compiling, where am I going wrong ?



asked 21 secs ago







I'm learning IntroToCS using Java and something went wrong

Aucun commentaire:

Enregistrer un commentaire