Results 1 to 5 of 5

Thread: Shortcut or real syntax.

  1. #1

    Thread Starter
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Resolved Shortcut or real syntax.

    I have this book that uses this statement to print stuff at the command line:

    Code:
    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)
    Last edited by System_Error; Dec 12th, 2004 at 07:36 AM.

  2. #2

    Thread Starter
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Re: Shortcut or real syntax.

    By the way, I have 1.5.

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Shortcut or real syntax.

    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.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4

    Thread Starter
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Re: Shortcut or real syntax.

    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.

  5. #5

    Thread Starter
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Re: Shortcut or real syntax.

    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();

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width