JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import java.util.Scanner;
import java.util.Random;
public class ChatBot {
public static void main(String args[]) {
Scanner s = new Scanner(System.in);
Random random = new Random();
System.out.println("🔥 Welcome to the Next-GEN Java Bot! Type 'exit' to leave. 🔥");
while (true) {
System.out.print("You: ");
String inp = s.nextLine().toLowerCase();
if (inp.equals("hi") || inp.equals("hello")) {
System.out.println("Bot: Hello! I'm the Next-GEN Java Bot. What's up?");
} else if (inp.equals("who created you")) {
System.out.println("Bot: I was created by the coder [Lokeshvaren K]! 👑");
} else if (inp.equals("how are you")) {
System.out.println("Bot: I'm just a program, but I'm feeling great! 😊");
} else if (inp.equals("what is java")) {
System.out.println("Bot: Java is a high-level programming language used worldwide.");
} else if (inp.equals("what is your name")) {
System.out.println("Bot: I'm the Next-GEN Java Bot! But you can call me ChatBuddy 🤖");
} else if (inp.equals("who is your favorite coder")) {
System.out.println("Bot: Of course, it's YOU! 😎");
} else if (inp.equals("tell me a joke")) {
String[] jokes = {
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run