I'm making basic chatbot,
i have to create topics.. eg work, play, cars"
it will prompt user to tell me about those topics...
now if user inputs "i like cars"
it will respond "tell me more about cars"
however if user inputs "i like cars!" (exclamation mark the difference)
im not sure how to get it to respond "wow you feel strong about that"
i tried
if (topic.contains("!")) { topic = JOptionPane.showInputDialog("wow you feel strong about that")
any help in recognising "!" in user input for an if statement?
thank you kindly for your assistance
Aucun commentaire:
Enregistrer un commentaire