Write a Java program to get particulars of his/her birthday and display it as shown below. Use 3 variables to hold date, month and year.

In this we are taking date, month and year with three different variable and then check whether the date is valid or not. The below program shows how to check whether the data value is valid or not. Example import java.util.*; class GetBirthDate { //get… Read More »Write a Java program to get particulars of his/her birthday and display it as shown below. Use 3 variables to hold date, month and year.

Justify the following statement in the context of Java. “ boolean can be true (Non-zero) or false(Zero)”.

In java boolean datatype is used to take value true or false.  This is the type that is returned by all relational operators, as in the case a<b. boolean is also required by conditional expressions that govern the control statement such as if and for.… Read More »Justify the following statement in the context of Java. “ boolean can be true (Non-zero) or false(Zero)”.

Write a Java program to display all primitive type variables. Also display your name in the last line.

The basic primitive datatypes are listed below. Integer Floating Point Character Boolean Here this types also categorized in other datatypes as follow. Integer This all stores signed, positive and negative values. byte short int long Floating Point Floating Point also known as real number are… Read More »Write a Java program to display all primitive type variables. Also display your name in the last line.