Results 1 to 4 of 4

Thread: PrintStream

  1. #1
    gyijhbk is offline Member
    Join Date
    Feb 2012
    Posts
    61
    Rep Power
    0

    Default PrintStream

    Why when I try to make the int numbers to print double in the Printstream file
    Java Code:
    /*      */   public void println(int paramInt)
    /*      */   {
    /*  735 */     synchronized (this) {
    /*  736 */       print(paramInt);
    /*  737 */       newLine();
                     print(paramInt);
    				 newLine();
    /*      */     }
    nothing happens.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,762
    Blog Entries
    7
    Rep Power
    21

    Default Re: PrintStream

    Why did you put those numbers in comments there? Are they line numbers? Are they significant to us? What do the print( ... ) and newLine() methods do? Why is that method synchronized? What is supposed to happen?

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,225
    Rep Power
    20

    Default Re: PrintStream

    What do you mean "nothing happens".
    That code there tells us next to nothing about either what you expect, or what it actually does.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,458
    Rep Power
    20

    Default Re: PrintStream

    Don't post the same question twice. I've merged the two threads and deleted the duplicate OP.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. PrintStream file manipulation
    By mDennis10 in forum New To Java
    Replies: 3
    Last Post: 12-13-2011, 03:37 AM
  2. NullPointerException with PrintStream write
    By vinci in forum Advanced Java
    Replies: 4
    Last Post: 02-05-2011, 05:21 AM
  3. Replies: 6
    Last Post: 05-19-2009, 01:22 PM
  4. Do uncaught errors appear in the PrintStream?
    By arnab321 in forum New To Java
    Replies: 1
    Last Post: 02-26-2009, 09:56 AM
  5. scanner vs. BufferedReader? printstream vs. FileWriter?
    By diggitydoggz in forum New To Java
    Replies: 1
    Last Post: 01-09-2009, 02:58 AM

Posting Permissions

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