import java.math.BigDecimal;

public class Java_bigdecimal_maximum {
	public static void main(String args[]) {
		// creating byte & double type arrays
		byte[] bg = { 1, 2, 3, 4 };
		double dig[] = { 1, 2, 3, 4 };

		BigDecimal big_0 = new BigDecimal(bg.length);
		BigDecimal big_1 = new BigDecimal(dig[3]);

		System.out.println("Value of object big_0 : "
				+ big_0);
		System.out.println("Value of object big_1 : "
				+ big_1);
		System.out.println("Method generated maximum "
				+"" + "value : "
				+ big_0.max(big_1));

		big_0 = new BigDecimal(bg[2]);
		big_0 = new BigDecimal(dig[2]);

		System.out.println("\nValue of object big_0 :" +
				" " + big_0);
		System.out.println("Value of object big_1 : " +
				big_1);
		System.out.println("Method generated maximum " +
				"value : " + big_0.max(big_1));

		// creating integer & string type arrays
		int[] in = { 10, 20, 30, 40 };
		String str[] = { "roseindia ", "technologies", 
				"private", "limited" };

		big_0 = new BigDecimal(in[0]);
		big_0 = new BigDecimal(str[1].length());

		System.out.println("\nValue of object big_0 : " +
				"" + big_0);
		System.out.println("Value of object big_1 : "
				+ big_1);
		System.out.println("Method generated maximum value" +
				" : "+ big_0.max(big_1));

		big_0 = new BigDecimal(in[1]);
		big_0 = new BigDecimal((str[1]
		             + str[2]).length());

		System.out.println("\nValue of object big_0 : "
				+ big_0);
		System.out.println("Value of object big_1 : "
				+ big_1);
		System.out.println("Method generated maximum " +
				"value : " + big_0.max(big_1));

	}
}