public class Main{
public static void main(String[]args){
System.out.println(estaAbierta(20) ? "Cerrado" : "Abierto");
}
public static boolean estaAbierta(int hora){
return hora>=8 && hora<=18;
}}
To embed this project on your website, copy the following code and paste it into your website's HTML: