Search:

Type: Posts; User: shenaz

Search: Search took 0.17 seconds.

  1. Replies
    20
    Views
    1,054

    [SOLVED] Re: to replace a word in file

    Ya right.complete code i din't post.it was appending to file but now i changed it.used replace().

    --- Update ---

    Yes yes.So i din use replace() inside loop.
  2. Replies
    20
    Views
    1,054

    [SOLVED] Re: to replace a word in file

    Thank you:)

    --- Update ---

    File contains algorithm.
  3. Replies
    20
    Views
    1,054

    [SOLVED] Re: to replace a word in file

    No problem.I will mark it as solved.

    --- Update ---

    I deleted writing newtxt to file.Instead after for loop i used s.replace() for replacing old contents with new.And then at once i wrote...
  4. Replies
    20
    Views
    1,054

    [SOLVED] Re: to replace a word in file

    b.write(s.toString) i used for writing to file. And then b.write(newtxt) for replacing.

    --- Update ---



    --- Update ---

    Thank you.As you told newtxt is not needed.But when i use replace()...
  5. Replies
    20
    Views
    1,054

    [SOLVED] Re: to replace a word in file

    The code i posted is partial.I din post the code of main function where am reading from one file.I stored the read contents in an array and passed it to a function.I have posted only that function.
  6. Replies
    20
    Views
    1,054

    [SOLVED] Re: to replace a word in file

    I am writing contents of array to a file.Array has "integer" "a" "b".
  7. Replies
    20
    Views
    1,054

    [SOLVED] Re: to replace a word in file

    The output of the code am getting is
    integer a b int.
    But i want to replace integer with int in output file.
  8. Replies
    20
    Views
    1,054

    [SOLVED] to replace a word in file

    I want to replace "integer" with "int" in a file.Following is the code i have written,but its working.Pls let me know my mistake.


    public static void declare(String[] array) throws IOException {...
Results 1 to 8 of 8