SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static void main(String[] args){
  2.     System.out.println(String.valueOf(Data.Foo.bar));
  3.     System.out.println(String.valueOf(Data.Foo.array[0].bar));
  4. }
  5.    
  6. True
  7. False
  8.    
  9. public class Data {
  10.     public class Base {
  11.         public boolean bar = false;
  12.         public Base[] array = {};
  13.     }
  14.  
  15.     public class Foo extends Base {
  16.         this.bar = true;
  17.         this.array = {Abc};
  18.     }
  19.     public class Abc extends Base {}
  20. }
  21.    
  22. public class Data {
  23.     public Foo foo = new Foo();
  24.     public Abc abc = new Abc();
  25.  
  26.     public class Base {
  27.         public boolean bar = false;
  28.         public Base[] array = {};
  29.     }
  30.  
  31.     public class Foo extends Base {
  32.         this.bar = true;
  33.         this.array = {abc}; //changed to abc from Abc
  34.     }
  35.     public class Abc extends Base {}
  36. }
  37.    
  38. public Foo foo = new Foo();
  39.     public Abc abc = new Abc();
  40.    
  41. public static void main(String[] args) {
  42.     System.out.println(String.valueOf(Datas.getFoo().getBar()));
  43.     System.out.println(String.valueOf(Datas.getFoo().getArray()[0].getBar()));
  44. }
  45.    
  46. public static void main(String[] args) {
  47.     System.out.println(String.valueOf(Door.isOpen()));
  48.     System.out.println(String.valueOf(Building.getDoors().atIndex(0).isOpen()));
  49. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top