0
How to get the answer I want step by step
3 Answers
+ 1
Scanner in =
new Scanner(System.in);//import Scanner;
String answer = "";
boolean goOn = true;
while(goOn){
System.out.println("yes or no");
answer = in.nextLine();
if(answer.equals("yes")){...}else{...}
in.close();
goOn = false;
}
System.out.println("Your answer : "+ answer);
0
which answer?? r u asking about the out put of a program??
0
No I asking about How to got answer 3