Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

Newbie System.out.println



Hi guys,

I’m Nick I’ve just joined the forum. Just wanted to say hello. I am pretty new to Java but have been teaching myself using books and the eclipse IDE. I know quite a lot about the syntax now and can write some pretty simple classes. I think I also understand classes, interfaces, inheritance and so on pretty well so think I’m well on my way.

The thing I’m wondering is what the ‘out’ refers in: system.out.println(“something”)

Usually you will have:
SomeClass.someMethod()
or
SomeClass.someMethod().someSubMethod().someSubMethod() etc…

But when I look at: system.out.println() is actually just looks like:
someClass.someVariable.someMethod()

how can you use dot syntax through a variable?

Hopefully that makes sense to you anyway

Thanks

Nick