My question is related with System.in and System.out classes (there might be others like those in the Standard library). Why is that? Isn't that a bad practice in OOP? Shouldn't it be used like: System.getIn() and System.getOut()? I've always had this question and I hope I can find a good answer here.
Why Java doesn't make use of encapsulation with some classes?
java;object oriented;encapsulation
The definition for the in and out fields within the System class are:public final static PrintStream out;public final static InputStream in;These are constants.  They happen to be objects too, but they are constants.  It is very much the same as the Math class:public static final double E = 2.7182818284590452354;public static final double PI = 3.14159265358979323846;Or in the Boolean class:public static final Boolean TRUE = new Boolean(true);public static final Boolean FALSE = new Boolean(false);Or in the Color class:public final static Color white     = new Color(255, 255, 255);public final static Color black     = new Color(0, 0, 0);public final static Color red       = new Color(255, 0, 0);When accessing a public constant that doesn't change, there isn't a significant advantage to encapsulate it - conceptually or performance based.  Its there.  It isn't going to change.There is no real difference between Color.white and System.out.