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...
Type: Posts; User: matt0605
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...
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 ...
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...
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...