0
public class Passageiro {
    public static void main(String[] args) {
        Viagem passageiro = new Viagem();
        passageiro.nomePassageiro = JOptionPane.showInputDialog("Digite o seu nome:");
        passageiro.dataEmbarque = JOptionPane.showInputDialog("Informe a data da sua viagem:");
        passageiro.destino = JOptionPane.showInputDialog("Informe o seu destino:");
        JOptionPane.showMessageDialog(null, passageiro.exibirReserva());
    }
}
Is there a specific format? Usually just use
toString().– Maniero
@bigown Normal format of same dates (day / month / year)
– José Guilherme
It should have other duplicates. Normal format is too wide, which is normal for you is not normal for someone else. Programming is detail.
– Maniero
So the exercise doesn’t ask for any specific format, I think it can be anyone’s choice.
– José Guilherme
new SimpleDateFormat("dd/MM/yyyy").format(new Date());– Gustavo Cinque