troubleshooting Question

non-static method

Avatar of tonelm54
tonelm54 asked on
4 Comments1 Solution235 ViewsLast Modified:
Hopefully this will be my last post here for Java!!!!

I have written a method (VB programming coming in here!)
which is called by "car31.setRegistationNumber(getReadInput("What is the Cars registration number?"));"
however get a "non-static method" error on every line I use this on, I cannot understand this error!!!

  private String getReadInput(String outPutTest)
    BufferedReader in = new BufferedReader(new InputStreamReader(;
    try {
      String keyRet = in.readLine();
      return keyRet;
    catch(Exception e) {
      return "-1";

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros