class main
{
/*
描画する絵を選択する処理
int i = checkInputKey(); //入力されたキー番号を取得
*/
HandlerThread tc = new HandlerThread( "tc" ) ; // カレントスレッド名を渡す
tc.start ( ) ; // Thread起動
Runnnaburu r = new Runnnaburu( tc) ;
new Handler( ) .post ( r) ;
}
public class Runnnaburu
implements Runnable {
HandlerThread ht;
public Runnnaburu( HandlerThread ht) {
this .ht = ht;
}
@Override
public void run( ) {
Log.d ( TAG, "test2" ) ;
Handler hi = new Handler( ht.getLooper ( ) ) ;
Log.d ( TAG, "test3" ) ;
public void run( ) {
Log.d ( TAG, "test4" ) ;
}
} ) ;
}
}
Y2xhc3MgbWFpbgp7CiAgLyoKICAgIOaPj+eUu+OBmeOCi+e1teOCkumBuOaKnuOBmeOCi+WHpueQhgogICAgaW50IGkgPSBjaGVja0lucHV0S2V5KCk7ICAgIC8v5YWl5Yqb44GV44KM44Gf44Kt44O855Wq5Y+344KS5Y+W5b6XCiAKICAqLwogICAgICAgIEhhbmRsZXJUaHJlYWQgdGMgPSBuZXcgSGFuZGxlclRocmVhZCgidGMiKTsgLy8g44Kr44Os44Oz44OI44K544Os44OD44OJ5ZCN44KS5rih44GZCiAgICAgICAgdGMuc3RhcnQoKTsgLy8gVGhyZWFk6LW35YuVCiAgICAgICAgUnVubm5hYnVydSByID0gbmV3IFJ1bm5uYWJ1cnUodGMpOwogICAgICAgIG5ldyBIYW5kbGVyKCkucG9zdChyKTsKfQogCnB1YmxpYyBjbGFzcyBSdW5ubmFidXJ1IGltcGxlbWVudHMgUnVubmFibGUgewoKICAgICAgICBIYW5kbGVyVGhyZWFkIGh0OwoKICAgICAgICBwdWJsaWMgUnVubm5hYnVydShIYW5kbGVyVGhyZWFkIGh0KSB7CiAgICAgICAgICAgIHRoaXMuaHQgPSBodDsKICAgICAgICB9CgogICAgICAgIEBPdmVycmlkZQogICAgICAgIHB1YmxpYyB2b2lkIHJ1bigpIHsKICAgICAgICAgICAgTG9nLmQoVEFHLCAidGVzdDIiKTsKICAgICAgICAgICAgSGFuZGxlciBoaSA9IG5ldyBIYW5kbGVyKGh0LmdldExvb3BlcigpKTsKICAgICAgICAgICAgTG9nLmQoVEFHLCAidGVzdDMiKTsKICAgICAgICAgICAgaGkucG9zdChuZXcgUnVubmFibGUoKSB7CiAgICAgICAgICAgICAgICBwdWJsaWMgdm9pZCBydW4oKSB7CiAgICAgICAgICAgICAgICAgICAgTG9nLmQoVEFHLCAidGVzdDQiKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgfQp9
compilation info
Main.java:9: <identifier> expected
tc.start(); // Thread??
^
Main.java:11: illegal start of type
new Handler().post(r);
^
Main.java:11: ';' expected
new Handler().post(r);
^
Main.java:11: illegal start of type
new Handler().post(r);
^
Main.java:11: <identifier> expected
new Handler().post(r);
^
Main.java:11: ';' expected
new Handler().post(r);
^
Main.java:11: invalid method declaration; return type required
new Handler().post(r);
^
Main.java:11: <identifier> expected
new Handler().post(r);
^
8 errors
stdout