MyApp.java:14: エラー: ';'がありません
MyRunnable r new MyRunnable();
MyAppの下線が気になります。
java
1 2 3class MyRunnable implements Runnable { 4 @Override 5 public void run() { 6 for (int i = 0; i< 500; i++) { 7 System.out.print('*'); 8 } 9 10 } 11} 12public class MyApp { 13 14 public static void main(String[] args) { 15 MyRunnable r new MyRunnable(); 16 Thread t = new Thread(r); 17 t.start(); 18 19 for (int i = 0; i< 500; i++) { 20 System.out.print('.'); 21 } 22 23 24 25 } 26}
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/04/02 13:25