Results 1 to 6 of 6

Thread: (Java)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Oct:2010
    Location: Varna
    Posts: 24

    (Java)

    :
    FileWriter f;
    try {
    f = new FileWriter("proba.txt");
    f.write(data);
    f.close();

    } catch (IOException ex) {
    Logger.getLogger(Kontrolno2View.class.ge tName()).log(Level.SEVERE, null, ex);
    }
    data , . ?

  2. #2
    Registered User
    Join Date: Oct:2003
    Location:
    Posts: 4,317

  3. #3
    Street Racer Rain9333's Avatar
    Join Date: Feb:2007
    Location: Bg, Gb
    Posts: 824
    bufferedWriter , . bsb, , , -> f = new FileWriter("proba.txt", true); (boolean if true, then data will be written to the end of the file rather than the beginning. )
    MSI X570-A PRO, AMD 5800X3D, Noctua NH-D15, Corsair Vengeance LPX 2x8GB-3600, ASUS RTX ROG 3080 Strix White OC, Samsung 980 Pro 1TB NVMe, Corsair RM750, FD Define R5, Dell 32" 4k G3223Q 144Hz + 3xSamsung G5 32" 144hz, SimLab P1-X, Simucube 2 Pro, HE Ultimate, SRB GT3 Wheel

  4. #4
    Registered User
    Join Date: Oct:2010
    Location: Varna
    Posts: 24
    "f = new FileWriter("proba.txt", true);" , ( ++ "\n" . , data data+

  5. #5
    Street Racer Rain9333's Avatar
    Join Date: Feb:2007
    Location: Bg, Gb
    Posts: 824
    Java ( google).

    Code:
     import java.util.Date;
        import java.text.DateFormat;
        import java.text.SimpleDateFormat;
    
        private String getDateTime() {
            DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
            Date date = new Date();
            return dateFormat.format(date);
        }
    data , String-a -> + "\n" .
    MSI X570-A PRO, AMD 5800X3D, Noctua NH-D15, Corsair Vengeance LPX 2x8GB-3600, ASUS RTX ROG 3080 Strix White OC, Samsung 980 Pro 1TB NVMe, Corsair RM750, FD Define R5, Dell 32" 4k G3223Q 144Hz + 3xSamsung G5 32" 144hz, SimLab P1-X, Simucube 2 Pro, HE Ultimate, SRB GT3 Wheel

  6. #6
    Registered User
    Join Date: Oct:2010
    Location: Varna
    Posts: 24
    "\n" ,

Posting Permissions

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

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |