Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: file

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Posts
    4
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default file

    Hey Guys,
    I want to ask about how to delete a line in files?
    thanks

  2. The Following User Says Thank You to catwoman For This Useful Post:

    nrickinedi (November 23rd, 2012)


  3. #2
    Junior Member
    Join Date
    Nov 2012
    Posts
    4
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default Re: file

    Can anyone answer me please ?

  4. The Following User Says Thank You to catwoman For This Useful Post:

    nrickinedi (November 23rd, 2012)

  5. #3
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 262 Times in 231 Posts

    Default Re: file

    No one has responded because no one knows what to say to that question.
    Try asking the question like you are talking to a group of people who can not see your screen and do not know what you are doing.
    Because we can't and we don't...

    Seriously the best answer I can give to that without being sarcastic is:
    Highlight the line you wish to delete and press backspace or delete...

  6. The Following User Says Thank You to jps For This Useful Post:

    nrickinedi (November 23rd, 2012)

  7. #4
    Junior Member
    Join Date
    Nov 2012
    Posts
    4
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default Re: file

    I mean I want to save data in file then when the user want to delete the task he click on delete button and delete it so I want to know how to delete it from the file (ToDoList program) I save the task in 5 lines first line is the name 2- description 3- Time 4- Priority 5- Date so if I want to delete the whole task I search for the name and delete the 5 line after it so If any one can help be to code it I'll be thankful.

  8. The Following User Says Thank You to catwoman For This Useful Post:

    nrickinedi (November 23rd, 2012)

  9. #5
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 139 Times in 134 Posts

    Default Re: file

    What have you tried and where are you stuck?

  10. The Following User Says Thank You to curmudgeon For This Useful Post:

    nrickinedi (November 23rd, 2012)

  11. #6
    Junior Member
    Join Date
    Nov 2012
    Posts
    4
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default Re: file

    I stuck in for loop I don't know the limit for the for I mean for (int i=0;i<= ?? ;i++) and I use adapter.remove(list.get(i)); but it didn't work list is arrayList

  12. The Following User Says Thank You to catwoman For This Useful Post:

    nrickinedi (November 23rd, 2012)

Similar Threads

  1. Created a Random Access File that saves gibberish to a text file
    By Deprogrammer in forum What's Wrong With My Code?
    Replies: 5
    Last Post: September 21st, 2012, 11:45 AM
  2. Run a jar file inside a batch file with Windows 7 Task schduler
    By kingnachi in forum What's Wrong With My Code?
    Replies: 2
    Last Post: June 15th, 2012, 09:20 AM
  3. solaris machine /tmp folder, File.exists() cant see the existing file.
    By aragorn1905 in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: December 27th, 2011, 08:41 AM
  4. insert(embed) a file object (.txt file) in MS excel sheet using java.
    By jyoti.dce in forum What's Wrong With My Code?
    Replies: 1
    Last Post: August 12th, 2010, 08:16 AM
  5. Replies: 8
    Last Post: January 6th, 2010, 08:59 AM