Skip to content

Instantly share code, notes, and snippets.

@edalquist
Created December 3, 2016 21:31
Show Gist options
  • Select an option

  • Save edalquist/57829696af2227663a9be367893e1d1b to your computer and use it in GitHub Desktop.

Select an option

Save edalquist/57829696af2227663a9be367893e1d1b to your computer and use it in GitHub Desktop.
public class Test {
public static void main(String[] args) {
System.out.println("A" + Data.B + "C");
}
}
public class Data {
public static final String B = "B";
}
edalquist-macbookpro:tmp edalquist$ javap -c Data
Compiled from "Data.java"
public class Data {
public static final java.lang.String B;
public Data();
Code:
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: return
}
edalquist-macbookpro:tmp edalquist$ javap -c Test
Compiled from "Test.java"
public class Test {
public Test();
Code:
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: return
public static void main(java.lang.String[]);
Code:
0: getstatic #2 // Field java/lang/System.out:Ljava/io/PrintStream;
3: ldc #4 // String ABC
5: invokevirtual #5 // Method java/io/PrintStream.println:(Ljava/lang/String;)V
8: return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment