mercredi 24 février 2016

If Else Java Syntax Issue

I am facing a very basic issue with my logic. Basically I have 2 conditions. One is when !quiet and the other is when its !quiet && _cmdLine.isInteractive.

I have tried to put them in an if else block but with the else I get a syntax error, and if I use just if statements or if-else if, it does not work. I have pasted my code below and need some help. I just cant figure out where I am going wrong on this.

if (!quiet) {
        String targetName = getPrintoutNameFromStartable(start,
                    picoName);
        System.out.print("message here");
}

if (_cmdLine.isInteractive()) {
        System.out.println("a different message");

        return 1;
}

Aucun commentaire:

Enregistrer un commentaire