Difference between PrintWriter.printline and PrintWriter.write


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Difference between PrintWriter.printline and PrintWriter.write

  1. #1
    Join Date
    Jul 2005
    Posts
    4

    Difference between PrintWriter.printline and PrintWriter.write

    Can anyone tell me the difference between the printline method and the write method of PrintWriter, especially when it is over sockets.

  2. #2
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    think of System.out

    print(content) or write(content) just inserts the content into the stream

    println( content ) inserts the content into the stream AND adds a line terminating character (new line)
    Last edited by nspils; 07-14-2005 at 08:57 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center