Search:

Type: Posts; User: matt0605

Search: Search took 0.07 seconds.

  1. Re: Reading a particular string and printing the line that contains the string from a text file

    Thanks for your assistance. I did a little reading on the String Class and chose the startsWith(). It did what I wanted it to do.


    import java.io.*;
    import java.nio.*;
    import...
  2. Re: Reading a particular string and printing the line that contains the string from a text file

    Hey Everyone, thanks for the your input and I appreciate the spoonfeeding info. As I mention I am new to Java and just wanted to get pointed in the right direction. It seems there are different ways ...
  3. Re: Reading a particular string and printing the line that contains the string from a text file

    I made the following change :
    if (line.equals("Yellow"))
    and it gave me the line that only starts with "Yellow" as the string. I believe that a start, but I want to print all the lines that start...
  4. Reading a particular string and printing the line that contains the string from a text file

    Hello,
    Please point me in the right correction. I am trying to read the test.txt file and print all the lines that contains the string "Yellow".

    Thanks!




    //package textfiles;
    import...
Results 1 to 4 of 4