JAVA error structure

0

Someone could help me, example at the end of the code has the option for the person to type YES or not, as it would for if the person typed another word, appeared a message Speaking is Yes or No and return the option to the person try again.

        valorTotalDoDia = valorTotalDoDia + valorCompra;
        System.out.println("♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎");
        System.out.println("O total do pedido deu: R$ " + valorCompra);
        System.out.println("♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎");
        z.clear();
        valorCompra = 0;
        System.out.println("Deseja finalizar o dia de trabalho ? ");
        fecharSistema = input.next("Sim para sair e Não para ficar");
        if (("Sim".equals(fecharSistema)) || ("sim".equals(fecharSistema))) {
            System.out.println("O valor total de vendas do dia é: R$ " + valorTotalDoDia);
            dia = false;
        } else {
        }

    }
}

}

    
asked by anonymous 05.06.2018 / 03:39

0 answers