[Solved] Storing input from main class into class method [closed]


You should create your array as a static variable rather than a local variable.

public class State
{
   private static String[] info = new String[5];


   public static void store(State state) {
      info[0] = ...
   }

   ...
}

Another better option is to create State as Concrete class rather than a Static class, but you should crawl before you walk 🙂

solved Storing input from main class into class method [closed]