25
Feb
2019

Age Calculator Java program for Date of birth

Age Calculator Java program for Date of birth. How to write a program in java to calculete age. Here is complete java program to calculete age with day, month and year. calculate age from date of birth . java class coding to calculate age from dob

class age
{
public static void main(String str[])
{
int currentday,currentmonth,
currentyear,birthday,
birthmonth,birthyear,
day,month,year;

currentday=25;
currentmonth=02;
currentyear=2019;

Age Calculator Java

birthday=9;
birthmonth=1;
birthyear=1991;

if(currentday>=birthday)
day=currentday-birthday;

if(currentday<birthday)

currentday=currentday+30;
currentmonth=currentmonth-1;
day=currentday-birthday;

if(currentmonth>=birthmonth)
month=currentmonth-birthmonth;

if(currentmonth<birthmonth)

currentmonth=currentmonth+12;
month=currentmonth-birthmonth;

year=currentyear-birthyear;

System.out.println(“Year=”+year);


System.out.println(“Month=”+month);


System.out.println(“Day=”+day);
}
}

Here is also different java and asp.net programs like:

  1. How to connect java with database|Using JDBC-ODBC Connection string
  2. How to Create combo box in java|Complete Coding
  3. Java program to calculate Age from Date of birth
  4. How to create a Recruitment or job announcement page in asp.net | Complete front end designing and backend coding
  5. How to Add multiple textbox values and showing their sum
  6. Employee Registration form | Creation of Registration form in visual studio using c# and asp.net
  7. How add new webpage in a website using C#, asp.net in visual studio.
  8. How to create login page using asp.net and C#

JAVA BYTE CODE, JAVA VIRTUAL MACHINE AND JIT

JAVA BYTE CODE is the form of instructions that the Java virtual machine executes. Each bytecode opcode is one byte in length, although some require parameters, resulting in some multi-byte instructions. Not all of the possible 256 opcodes are used.

You may also like...

2 Responses

  1. Muhammad Kashif says:

    Excellent dear….

    • elmseekho says:

      Thanks for your appreciation. we will try to give you updated solutions of java, asp.net and oracle related topics. plz keep in touch

Leave a Reply

Your email address will not be published. Required fields are marked *