PDA

Click to See Complete Forum and Search --> : Shortcut or real syntax.


System_Error
Dec 11th, 2004, 07:33 AM
I have this book that uses this statement to print stuff at the command line:


out.println();


I never can get this to compile. So I was wondering if the authors were just to lazy to add the System part, or is something up with my compiler.(which I seriously doubt)

System_Error
Dec 11th, 2004, 07:34 AM
By the way, I have 1.5.

CornedBee
Dec 11th, 2004, 01:13 PM
Either they're too lazy or they have a out variable somewhere in the test class that they set to System.out. Or, since this is 1.5, they might have done a static import.

System_Error
Dec 12th, 2004, 06:36 AM
Thank you. Since they do this in some of their examples, and don't have any static imports, my guess is that they are too lazy. Pretty sad huh.

System_Error
Dec 18th, 2004, 11:26 AM
I finally figured out what they were doing. In one of their examples way later in the book, they have a (PrintStream out) as one of the paremeters for their constructors. Then they are just using out.println();