7:47 pm - Thursday April 25, 2019

Double Example Program for intValue()

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
// Double Example Program for intValue()
/**
 * @author: candidjava.com
 * @description: This program returns the integer value of the Double object
 */

public class Int {
	public static void main(String[] args) {
		Double d = new Double(143.341); // Create a new Double Object
		int i = d.intValue(); // Convert the Double value into integer value
		System.out.print(i);
	}
}

output:
143

Filed in: Z-A All Java Codes

Comments are closed.