Skip to content

Instantly share code, notes, and snippets.

@tpolecat
Created May 23, 2013 17:39
Show Gist options
  • Save tpolecat/5637902 to your computer and use it in GitHub Desktop.
Save tpolecat/5637902 to your computer and use it in GitHub Desktop.
class A(n:Int) {
println(n)
}
cookie:tmp rnorris$ javap -classpath . A
Compiled from "test.scala"
public class A extends java.lang.Object{
public A(int);
}
---
class A(n:Int) {
println(n)
def x = n
}
cookie:tmp rnorris$ javap -private -classpath . A
Compiled from "test.scala"
public class A extends java.lang.Object{
private final int n;
public int x();
public A(int);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment