2:31 am - Tuesday April 23, 2019

Double Example Program for compare(double d1,double d2)

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044

/**
@Author:Candid
@discription:Double Example Program for compare(double d1,double d2)
**/

class Samm
{
public static void main(String args[])
{
double d1=15.56;         //Initialize double values
double d2=143.5;
if(d1==d2)               //using if condition for compare d1 and d2
{
System.out.println("The obsolute value is:"+d1);
}
else
{
System.out.println("The obsolute value is:"+d2);
}
}
}



Output:

   The obsolute value is:143.5

Filed in: Z-A All Java Codes

Comments are closed.