How do I use object object1 = new object on my program?
<p>I have an assignment where my program outputs a simple String using if conditions of another String, but I keep running into a problem where I cannot create a new instance(i think that is what it is called)</p>

<p>anyway, here is my code</p>

<pre><code> import java.util.Scanner;


public class EP54
{
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);    
        System.out.print("Do you want to continue? ");
        **yesNoChecker check1 = new yesNoChecker();**
        System.out.print(EP54.yesNoChecker);
    }

   public String yesNoChecker()
   {
       if(in.equalsIgnoreCase("y") ||
         in.equalsIgnoreCase("yes") ||
         in.equalsIgnoreCase("Sure") ||
         in.equalsIgnoreCase("why not"))
         System.out.println("OK");
       else if(in.equalsIgnoreCase("y") ||
         in.equalsIgnoreCase("yes") ||
         in.equalsIgnoreCase("Sure") ||
         in.equalsIgnoreCase("why not"))
         System.out.println("Terminating.");
       else
         System.out.println("Bad Input");
   }
}
</code></pre>

<p>Please help me! (bolded part is where I get error)</p>

<p>Can anybody give me a working version of the code so I can compare it with mine?</p>
