I am writing Java code where I would like the desired responses applied to the correct statments made by the user.
I have the following code, which works correctly:
public void chat(String talk)
String intro = "Hi";**Local Variable**
However, on the
String intro = "Hi";line I would like to include other words, as well as "Hi". However I do not know how. I have experimented with it; using || , + () etc. and haven't found a solution which works.
Can anyone help?