Description Of MathContext: hashCode()
The java.math.MathContext.hashCode() returns the hash code for this MathContext.MathContext.hashCode() method returns the hash code for this MathContext.
Code Example Java MathContext
import java.math.MathContext; import java.math.RoundingMode; public class BigDecimalExam { public static void main(String[] args) { MathContext mc1 = new MathContext(2, RoundingMode.DOWN); MathContext mc2 = new MathContext(2, RoundingMode.HALF_UP); int i1 = mc1.hashCode(); int i2 = mc2.hashCode(); // print i1, i2 values System.out.println(i1); System.out.println(i2); } }
ไม่มีความคิดเห็น :
แสดงความคิดเห็น