Results 1 to 3 of 3
  1. #1
    nirasiva is offline Member
    Join Date
    May 2011
    Location
    chennai
    Posts
    29
    Rep Power
    0

    Default how to write the String Array into the own file

    hello sir:
    i create a new file my coding
    Java Code:
    try {
    	        File file = new File("Logfilename.txt");
    	        FileInputStream fileInputStream = new FileInputStream(file);
    	        f = new FileOutputStream(file);
    	        d=new DataOutputStream(f);
    	       catch (IOException e) {
    	    }
    I want to wite the value into my file .. My value is s...i want to take the value s and wite in my file
    Java Code:
    for(String s : WMSLoggerIDs.FD_ALL) {
    			   System.out.println(WMSLoggerFactory.getGlobalLogValue(s));

  2. #2
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    Check out the io tutorials, it's fairly simple with a print writer.
    Lesson: Basic I/O (The Java™ Tutorials > Essential Classes)

  3. #3
    nirasiva is offline Member
    Join Date
    May 2011
    Location
    chennai
    Posts
    29
    Rep Power
    0

Similar Threads

  1. Making a String Array from a text file
    By MrJimmah in forum New To Java
    Replies: 5
    Last Post: 11-16-2010, 11:19 PM
  2. writing string array in to a file
    By abdullahansari in forum New To Java
    Replies: 13
    Last Post: 08-29-2010, 04:25 AM
  3. String array from file to ComboBox
    By cselic in forum AWT / Swing
    Replies: 3
    Last Post: 05-06-2010, 05:29 PM
  4. How to write text file into Array
    By venkat.ravala in forum New To Java
    Replies: 13
    Last Post: 11-19-2009, 04:59 PM
  5. How to write a string middle of a text file?
    By loggen in forum New To Java
    Replies: 5
    Last Post: 12-19-2008, 08:48 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
  •