Advertisement
Guest User

Untitled

a guest
Sep 27th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. public class Main{
  2. public static void main(String args[]){
  3. Yuck why = new A().foo();
  4. why.bar();
  5. }
  6. }
  7.  
  8. interface Yuck{
  9. void bar();
  10. }
  11.  
  12. class A{
  13.  
  14. private char x = 'x';
  15.  
  16. class C{
  17. private char v = 'v';
  18. public char u = 'u';
  19. }
  20.  
  21. public Yuck foo(){
  22.  
  23. char y = 'y';
  24. final char z = 'z';
  25. final C c = new C();
  26.  
  27. c.u = 'n';
  28. y = 'w';
  29. class B implements Yuck{
  30. public void bar(){
  31. System.out.printf("%s,%s,%s,%s\n", c.u /*later*/, c.v /*not qualified*/, x, z);
  32. //System.out.println(y);
  33.  
  34. }
  35. }
  36. B b = new B();
  37. b.bar();
  38. return b;
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement