Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class BroadcastReceiver{
- public void onReceive() {
- System.out.println("abstract");
- }
- }
- public class Main
- {
- public static void main(String[] args) {
- BroadcastReceiver ex0 = new BroadcastReceiver();
- BroadcastReceiver ex1 = new BroadcastReceiver(){};
- BroadcastReceiver ex = new BroadcastReceiver(){
- @Override
- public void onReceive() {
- System.out.println("BroadcastReceiver : onReceive");
- }
- };
- System.out.println(ex0.getClass() == BroadcastReceiver.class);
- System.out.println(ex0.getClass() == ex1.getClass());
- System.out.println(ex.getClass() == BroadcastReceiver.class);
- System.out.println(ex.getClass());
- System.out.println(BroadcastReceiver.class);
- System.out.println(ex instanceof Object);
- }
- }
Add Comment
Please, Sign In to add comment