samedi 17 février 2018

Putting System.out.println(); into if statements

Is there a way that I can detect something said in the console like so (This dosent' actually work)

if(system.out.println("Hello")){
System.out.println("Hi");
}

So what that does is detect "hello" in console and says "hi," but that does not work! Is there another way to do this?

Thanks!!

Aucun commentaire:

Enregistrer un commentaire