Understanding -- new Class() -- syntax.
What is the point of setting testLayout to equal FlowLayout? It seems to me now we have two classes FlowLayout and now testLayout that are both the same, isn't that counter productive? I see this, "Class newClass = new Class()", type of syntax a lot in Java programming.
FlowLayout testLayout = new FlowLayout();
Why wouldn't Java do setLayout.FlowLayout(); or something like that? What is it that I am missing here?
I am hoping the answer to this can help me better understand Java. I bought a book Sams Teach Yourself Java, and it is pretty good. I am on hour 14 out of 25, but still have questions. I intend on getting very good at Java and understanding it very well.