whats the problem? (line 33) , sololearn cant run the program... (run it on another platform). the problem is to tell that if th
import java.util.Scanner; class door{ static boolean open = false; public static void openDoor(){ open = true; } public static void closeDoor(){ open = false; } } public class Main { public static void main(String[] args) { door d = new door(); Scanner s = new Scanner (System.in); String x = s.nextLine(); x = x.substring (0 , 1).toUpperCase() + x.substring (1); if (x.equals ("Open")){ d.openDoor(); System.out.println ("Door is open"); }else if (x.equals ("Open") && d.open){ System.out.println ("The door is already open..."); }else if (x.equals ("Close") && d.open = false){ System.out.println ("The door is already closed..."); } else{ System.out.println ("ERROR"); } String r = s.nextLine(); r = r.substring (0 , 1).toUpperCase() + r.substring (1); if (r.equals ("Close")){ d.closeDoor(); System.out.println ("Door is closed"); }else if (r.equals ("Open") && d.open){ System.out.println ("The door is already open"); } else{ System.out.println ("ERROR"); } } }