What do the curly braces do there ?
handler1 = new Handler() { public void handleMessage() { } };
object = new Class_Name() {}; ? This syntax exists only on Android or Java also? And what is it called in Java? Thank for your helps.
object = new Class_Name() {};
This is the syntax for creating an instance of anonymous class that extends Handler. This is part of Java.
Handler
1.4m articles
1.4m replys
5 comments
56.9k users