I\'ve been programming a Bukkit plugin for a while now, and this one issue has me stumped. I\'m trying to read a line from a file using a Scanner, and add everything on the line
try this:
import java.io.*;
import java.lang.*;
import java.util.*;
public class test {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while(in.hasNextLine()) {
String line = in.nextLine();
String parse = line.substring(0, line.lastIndexOf(':'));
System.out.println(parse);
}
}
}