Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Using the code above and using JDK 1.6.0_33 I get the following output:</p> <pre><code>src\test&gt;javap -c -s InnerClassTest1$Inner1 Compiled from "InnerClassTest1.java" public class test.InnerClassTest1$Inner1 extends java.lang.Object{ final test.InnerClassTest1 this$0; Signature: Ltest/InnerClassTest1; public test.InnerClassTest1$Inner1(test.InnerClassTest1, java.util.List); Signature: (Ltest/InnerClassTest1;Ljava/util/List;)V Code: 0: aload_0 1: aload_1 2: putfield #1; //Field this$0:Ltest/InnerClassTest1; 5: aload_0 6: invokespecial #2; //Method java/lang/Object."&lt;init&gt;":()V 9: aload_0 10: aload_2 11: putfield #3; //Field arg:Ljava/util/List; 14: return public int getX(int); Signature: (I)I Code: 0: iload_1 1: ireturn } src\test&gt;javap -c -s InnerClassTest2$Inner1 Compiled from "InnerClassTest2.java" public class test.InnerClassTest2$Inner1 extends java.lang.Object{ final test.InnerClassTest2 this$0; Signature: Ltest/InnerClassTest2; public test.InnerClassTest2$Inner1(test.InnerClassTest2, java.util.List); Signature: (Ltest/InnerClassTest2;Ljava/util/List;)V Code: 0: aload_0 1: aload_1 2: putfield #1; //Field this$0:Ltest/InnerClassTest2; 5: aload_0 6: invokespecial #2; //Method java/lang/Object."&lt;init&gt;":()V 9: aload_0 10: aload_2 11: putfield #3; //Field arg:Ljava/util/List; 14: return public int getX(int); Signature: (I)I Code: 0: iload_1 1: ireturn } </code></pre> <p>and the only differences are that my implementation has (to make the code compile):</p> <pre><code> public int getX(int i) { return i; } </code></pre> <p>and the fact that your package name is probably different (org.benf.cfr.tests ?).</p> <p>Other than that though, my output is pretty much the same. Are there any other differences in the code that might explain what you're seeing? From what I know about the compilation process and class files I wouldn't expect to see a difference in the output.</p> <p>Good question - be interesting to find out why you're seeing this</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload