develop

HOW TO MAKE A CHATBOT IN JAVA



Sharing buttons:

sometimes my name is way forward welcome

to my java tutorial and in this tutorial

I'll be showing you how to design a chat

bot in Java so let's get started the

first thing I need to do a very clearly

class I'm using Eclipse so I need to

create my main class I need to set this

enameling class whether it's gonna be

public static void main string yes in a

square bracket it's gonna be outside so

I need to extend this as a JPEG standard

frame so I need to import this alright

so that started bodies and let me create

a public on public pot so I need to call

it yeah you know what

so this is gonna all just gonna pop this

out so first I need to do to create an

instance of mine Jeffrey it's gonna be

Jeff frame frame the costume you Chifa

so phone God set default close option

which is gonna be exit on clothes away

is it on clothes shame that it's visible

sale visible true and then frame that's

it

resize it blue it's gonna be false

and said yeah so I mean no this should

be false

fel ASCII so on flame need to set the

size that's it that's it sighs it's

gonna be 600 by 600 so what I was I need

ya to let me run decency so this is my

friend let me set it tied to the sex tie

too

chatbox

so this one this you can see I have

chatbot yeah so the next thing I need to

do is to is to one creates it text via

under now the text field private G test

area equals to UM charts area goes to J

side and Avenue J test area and also it

takes feud we're gonna load my text deep

deep texture to is gonna be chat box

question yeah G text huge if I D so

that's that then you can put this and

also this so let me add it to nine it's

gonna be frame touch ad

charts area film that's odd judge which

I need to use chat box nuts chat BOTS

chat box then I'm down to the nesting

them in young for test area it's gonna

be charged area that said size is gonna

be gonna be 500 I am 400 shots zero

that's its position education rather

education is going to be on less it too

it's like - so all I'm doing is just

trying to format my pizza you see what

I'm saying that just for test field it's

gonna be on Chad Fox set size which is

gonna be on the safe 540 by touching

chat box that said Keisha we're gonna be

too vile so so let's turn this on see

oops

I have it all the way around because my

text field it's gonna be - let me give

this 550 no this oops it's done let me

say 500 so I have this this is my test

area this is like text field so let me

just leave this a simple access so you

can just go ahead and try to move this

in the middle and I don't want to risk

myself the time so now let's go to the

code so after we have all designed this

then the next thing is to use the action

performed sweetest quits a private a

rich no no no no no no that should be

untouched on this you know which is

gonna be charged plus that's it

pop chart listener dots add say add

option this you know it's gonna be new

actually this so let me import this and

also I don't imitate this so now when we

click on entered we need to perform an

instruction air together

so in essence to write the code for the

instruction so first of all um I need to

create a strength which got old the text

is going to be cheap text because down

on chat box that get text

and then I'm charged there is a chat

area okay this cops let us see shout

yeah it's up and it's gonna be you do

test and then an end line so that's that

about this then also we need to clear

the chat box touch sorry don't set text

No

so that's not least I see what I'm

saying right so now anything any time we

type whatever and that it's gonna show

there so you can see so we need to undo

the response no it's gonna be an if

statement

if the test if G test Tom contain the

word height then um they should be an

instruction I'm trying to decide the

text yeah so another not to repeat on

this language if a method a is going to

be private

I read for it but it's gonna have

argument there's gonna be string string

string it's gonna be um she's gonna be

chat the area

oh sorry it shouldn't be yeah 2x chat

air that's obtained so just gonna old

what the bots is gonna say but string

also end line so we get that

wait why why why why do the cops letter

X so another how to repeat this ever

time then I not want to create this so

it's gonna be but to fly with world hola

so you see that anytime we type I then

it's gonna be that although let's run

this so you can see what I'm saying

let's continue I you can see follow and

then write anything else it's not going

to apply

so yes use the elf statement it's gonna

be else but

I don't understand understand you

[Applause]

so you see by you I understand so since

this sensitive i/o are you ha

so we type anything different from this

it's gonna give you this the so that's

the first so we can we can we can down

so I don't know what that you notice

something look at the program I have I

yeah I got it

sorry so this i on i it's also i I don't

understand

so it's actually want me to type exactly

what is it so if I type hi

you can see I have other so in order to

avoid this I can just convert my chat to

locus by using this smooth low kiss

which is no ugh it's no argument so then

I run this so any type of I I type it's

gonna a subject now in the work is I so

she don't give me that okay okay okay

then I need to convert everything to the

walkies so everything it's gonna be into

a kiss so whatever whatever type of

another type of a kiss comes in it's

still gonna give me hola

you see hi

come to data I and smaller 2h still

gonna give me follow see see this is

just out attempt to create a simple chat

bot and to just make this and to make

the zone

cool then we can now put in random

statement search data it's gonna give

different outputs it was gonna be Ames

land I need to class the end

it's gonna be not much Dutch lunch

so let me give it a thumbs a number of

three option I don't want this to be too

long so this is gonna provide a random

number so now if come over and over from

one to three so if you want an equals m1

then I should have this should be 2

equals Raftis LZ

equals two and I should up another

feelin tad country C control V I didn't

understand and understand you bro

don't you see

does the random number is gonna go to

random number from 1 to 3 as well giving

it three different options

it is call me game you can see so now

let's run this

oh it's wrong

please come again

hello exist

if house if I was evil if was wrong

else else evil if okay she should be

fine now what's up

so let's say I type something different

from this I do understand you and

understand you bro what's up what's up

with you

others you have so you can see it's

gonna give me to friend so that's that

about this this is just create a simple

it simply chat but whatever so um that's

that about this you can just decide you

want to copy this all over again let me

start from a and C yeah this ends

somebody's if-else so let me copy this

what you see

and then they see how are you oh just

out then let's run this again

how are you

I have other that's the reply

I put yeah again so this is out to

create a simple chat words in Java using

swing and I would still do more of this

I just want to create something simple

with done eclipse I will try to do

something on Java FX and then using that

spin also so thank you for watching and

always remember to subscribe on my

channel is to wait for what Academy on

YouTube and then also degree for that

kidding me on Facebook thank you for

watching