package typeConv;

import java.lang.Math;

class Demo {
	public static void main(String[] args) {
		int i = (int)12.5f; // Casting conversion float to int; compile error without cast
		System.out.println("(int)12.5f==" + i); // Convert i to string
		float f = i; // int to float, widening conversion
		System.out.println("after float widening: " + f); // Convert f to string
		System.out.print(f);
		f = f * i; // Convert i to float - operation is float*float
		System.out.println("*" + i + "==" + f); // Two strings: i and f:
		double d = Math.sin(f); // float to double, Math.sin needs a double argument
		System.out.println("Math.sin(" + f + ")==" + d); // Two strings: f and d

		Integer width = 10;
		Integer height = 12;
		Integer area = width * height;

		System.out.println("width="+width + " height="+height + " area="+area);
	}
}