java - how to make an if statement then send a message -


how make if input user yes, send messaage hunted cow!

system.out.println("would hunt cow?"); system.out.print("yes or no?"); string = kbreader.next(); system.out.println("you hunted cow!") 

if (a.equalsignorecase("yes")) {     ... } 

(or equals if want match "yes" exactly)


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -