compile error 17 class x public static void

  • Slides: 11
Download presentation

compile error (1/7) class x} public static void main(String args}([] x = 6; if

compile error (1/7) class x} public static void main(String args}([] x = 6; if (x > 5 ( System. out. println("value: " + x ; ( { { cannot resolve symbol : variable x location: class x http: //www. thaiall. com/class Page: 3

compile error (2/7) class x} public static void main(String args}([] int x; x =

compile error (2/7) class x} public static void main(String args}([] int x; x = 6; if (x > 5 ( System. out. println("value: + x ; ( { { '('expected http: //www. thaiall. com/class Page: 4

compile error (3/7) class x} public static void main(string args}([] int x; x =

compile error (3/7) class x} public static void main(string args}([] int x; x = 6; if (x > 5 ( System. out. println("value: " + x ; ( { { cannot resolve symbol : class string location: class x http: //www. thaiall. com/class Page: 5

compile error (4/7) class x} public static void main(String args}([] float x; x =

compile error (4/7) class x} public static void main(String args}([] float x; x = 6. 5; // f, d if (x > 5( System. out. println("value: " + x; ( { { possible loss of precision found : double required: float http: //www. thaiall. com/class Page: 6

compile error (5/7) class x} public static void main(String args}([] char x = 65;

compile error (5/7) class x} public static void main(String args}([] char x = 65; // A if (x > 5( system. out. println("value: " + x; ( { { package system does not exist http: //www. thaiall. com/class Page: 7

compile error (6/7) class x} public static void main(String args}([] char x = 65;

compile error (6/7) class x} public static void main(String args}([] char x = 65; // A if (x > 5( System. out. print. In("value: " + x; ( { { cannot resolve symbol : method print. In (java. lang. String( location: class java. io. Print. Stream http: //www. thaiall. com/class Page: 8

compile error (7/7) class x} public static void main(String args}([] char int = 97;

compile error (7/7) class x} public static void main(String args}([] char int = 97; { { class y{ } not a statement char int = 97; '; 'expected char int = 97; http: //www. thaiall. com/class Page: 9

Run time error (1/2) class x} public static void main(String args}([] System. out. println(args[0;

Run time error (1/2) class x} public static void main(String args}([] System. out. println(args[0; ([ { { DOS>java x Exception in thread "main" java. lang. Array. Index. Out. Of. Bounds. Exception: 0 DOS>java x y y http: //www. thaiall. com/class Page: 10

Run time error (2/2) class x} public static void main(String args}([] System. out. println(5;

Run time error (2/2) class x} public static void main(String args}([] System. out. println(5; ( System. out. println(5 / 0; ( { { DOS>java x 5 Arithmetic. Exception : / by zero http: //www. thaiall. com/class Page: 11