Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. public class Main {
  2. int x;
  3. private Main() {
  4. x = 10;
  5. }
  6. static Main foo(){
  7. return new Main();
  8. }
  9. public static void main(String[] args) {
  10. Main m = Main.foo();
  11. System.out.println(m.x);
  12. }
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement