I and really new to Java and I'm sure that there is a way to do this so I'm going to ask: Can you call the main method from the class?
import java.io.*; public class Chemicalcommandline { public void start() { String instructions = "This program " + "" + "" + "" + ""; System.out.println(); System.out.println("Chemical Sign: "); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String chemical = null; try { chemical = reader.readLine(); } catch(IOException ioe) { System.out.println("Error"); } //start very long if if (chemical.equals("Ca")) { System.out.println("Calcium"); } main(); } public static void main(String[] args) { Chemicalcommandline client = new Chemicalcommandline(); client.start(); } } How could I call the main so that the code does not quit after getting one input?