.source LookupSwitchDemo.pho .class public LookupswitchDemo .super java/lang/Object .method public ()V aload_0 invokespecial java/lang/Object/()V return .end method ; switches on the passed in integer and ; returns different values ; - for 1, returns 10 ; - for 10, returns 100 ; - default, returns 0 .method private demo(I)I .limit stack 3 .limit locals 3 ldc "Hello, world" iload_1 lookupswitch 1 : Handle1 10 : Handle10 default : HandleDefault Handle1: ldc 10 ireturn Handle10: ldc 100 ireturn HandleDefault: ldc 0 ireturn .end method .method public static main([Ljava/lang/String;)V .limit stack 3 .limit locals 3 new LookupswitchDemo dup invokespecial LookupswitchDemo/()V astore_1 aload_1 ldc 1 invokevirtual LookupswitchDemo/demo(I)I jsr PrintInt aload_1 ldc 10 invokevirtual LookupswitchDemo/demo(I)I jsr PrintInt aload_1 ldc 100 invokevirtual LookupswitchDemo/demo(I)I jsr PrintInt aload_1 ldc 200 invokevirtual LookupswitchDemo/demo(I)I jsr PrintInt aload_1 ldc 12345 invokevirtual LookupswitchDemo/demo(I)I jsr PrintInt return PrintInt: astore_2 getstatic java/lang/System/out Ljava/io/PrintStream; swap invokevirtual java/io/PrintStream/println(I)V ret 2 .end method