|
how would I include this code in the above?? I tried it like this, but it didn't work
import java.io.*;
public class SplittingText {
public static void main(String[] args) {
System.out.println("Which Street?:");
// Opens up standard input
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String target = null;
String path = "splittingText.txt";
try {
target = br.readLine();
} catch (IOException ioe) {
System.out.println("IO error reading command line input");
System.exit(1);
}
String[] s = line.split("\\=");
System.out.println("value for " + target +
" is: " + s[1]);
br.close();
} catch(IOException e) {
System.out.println("read error: " + e.getMessage());
}
}
|