I know that you cannot make reference to a static variable from a non-static method. Created an instance method to be called in my main method, and as you can see I made the main class non-static (atleast I think I did). The error that I am getting is on line 19 "Non-static method 'readLine()' cannot be referenced from a static context". Seems like such a simple problem but I can't wrap my head around it.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class PeerMain {
public void main(String[] args) throws IOException
{
PeerMain PEER = new PeerMain();
PEER.run();
}
public void run() {
BufferedReader bfr = new BufferedReader(new InputStreamReader(System.in)); //prompt user for input
System.out.println("> Enter ID & port: ");
String[] userInput = BufferedReader.readLine().split(" "); // pick up user input
}
}