/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
import java.util.ArrayList;
import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
Scanner sca = new Scanner(System.in);
ArrayList<String> words = new ArrayList<String>();
words.add("Hello");
System.out.println("What is your name? ");
String name = sca.next();
System.out.print("Message: ");
String message = sca.next();
String reply = "Reply: ";
if(message.equals(words.get(0))){
System.out.println(reply+"Hi!, how are you "+name);
message = sca.next();
}
else{
System.out.println("not understand");
}
}
}