0:00
hi friends welcome to tasers funny
0:02
channel today i'm going to teach how to
0:07
make the age calculator system in java
0:10
so this is the one you can go to the
0:12
file new project java van java
0:16
application click next
0:18
create main target and check it age
0:33
the age calculator here select the
0:36
source package default package right
0:38
click new j frame for select age
0:57
yeah first what i'm going to do is we
1:02
this label i'm going to name it as age
1:16
click on this back properties
1:33
right now we set the right position over
1:36
here after that what i'm going to drag
1:42
this label i'm going to name it as you
1:45
have to name it as this one as you have
1:50
add your date of birth
2:04
select this one properties
2:16
right click properties
2:25
id back to select again txt
2:33
birth you write birth
2:49
so we have to find the h
2:52
so write a okay button to find the h
3:01
simply you have to find the h so double
3:05
yeah before that we have to select this
3:34
select this one properties
3:44
open the you can see like this this
3:47
window double click on that okay button
3:52
so what i'm going to do is here
4:19
implement this name space click on it
4:30
first what i'm going is we have first we
4:32
have to this text box field we have to
4:38
you write text dot get text
4:48
get text so we have get text
4:51
uh you have get text you have write this
5:23
out put the date over here
6:18
your right what's the problem here you
6:20
have to import that uh for me i have to
6:23
add this name space after that write dot
6:52
month year month date
7:06
and if you have to make this one as a
7:08
string it's not problem
7:11
string you have to write this one as
7:12
string we don't need this one
7:17
that would be fine okay no in there
7:21
now what i'm going to do is now i i want
7:23
to calculate that one cage we have to
7:28
uh we have to calculate that one
7:38
now you have to type over here
7:47
you write here you write here
7:51
uh age you write age equal
8:19
write now you have write this one you
8:21
have to implement this one okay now here
8:24
this is the local time okay this will be
8:27
now you have calculated the uh from the
8:30
date of birth what you have selected
8:32
from now now the present time so we have
8:37
to generate it as a option pan dot show
8:47
this here dial here here this one should
8:53
let's run the project you have to write
8:57
this you have to use this one as a our
9:13
it is here 99 okay this it is 39
9:18
age you can see the two months you have
9:20
24 day it will generate it like this so
9:25
here you have to generate it uh on that
9:33
simple modification i made this one so
9:36
this one we have to get this age you
9:38
have get it the year get years get
9:41
months and get this we in java we have
9:45
uh this this age this write this class
9:48
we have this methods in order to get the
9:52
years and months and days put into the
9:55
respective variables here you pass it
9:57
okay your age is years
10:01
out of the months and days let's check
10:12
okay 39 years 2 months and 24 dates this
10:16
is my date thank you for watching if you
10:20
love my channel please subscribe me like
10:21
me thank you for watching