How can I code a struct-like class that contains public variables, and then be able to access them from another class without using getters and setters?
I know how to do getter/setter but they just take a lot of typing space, so I was wondering if maybe using an inner class would eliminate that? From what I understand, static means I can have only one x variable, which I can't do, because I need an array.
public class publicClass {
    innerclass array_inner[];
    class innerclass {
        private int x;
        innerclass(int x){this.x = x;}
        ...
    }
    public publicClass {array_inner = new innerclass[5];}
    public access_x {
       array_inner[0].x; 
    }
}
 
     
     
    