Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args){
- System.out.println(String.valueOf(Data.Foo.bar));
- System.out.println(String.valueOf(Data.Foo.array[0].bar));
- }
- True
- False
- public class Data {
- public class Base {
- public boolean bar = false;
- public Base[] array = {};
- }
- public class Foo extends Base {
- this.bar = true;
- this.array = {Abc};
- }
- public class Abc extends Base {}
- }
- public class Data {
- public Foo foo = new Foo();
- public Abc abc = new Abc();
- public class Base {
- public boolean bar = false;
- public Base[] array = {};
- }
- public class Foo extends Base {
- this.bar = true;
- this.array = {abc}; //changed to abc from Abc
- }
- public class Abc extends Base {}
- }
- public Foo foo = new Foo();
- public Abc abc = new Abc();
- public static void main(String[] args) {
- System.out.println(String.valueOf(Datas.getFoo().getBar()));
- System.out.println(String.valueOf(Datas.getFoo().getArray()[0].getBar()));
- }
- public static void main(String[] args) {
- System.out.println(String.valueOf(Door.isOpen()));
- System.out.println(String.valueOf(Building.getDoors().atIndex(0).isOpen()));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement