From 93ff183cf259c78494f31b47cd004935c32a89d2 Mon Sep 17 00:00:00 2001 From: Artem Melentyev Date: Sun, 18 Nov 2012 02:07:05 +0600 Subject: [PATCH] add example for #4: Boxing Overloading --- examples/ValueOf.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 examples/ValueOf.java diff --git a/examples/ValueOf.java b/examples/ValueOf.java new file mode 100644 index 0000000..229df66 --- /dev/null +++ b/examples/ValueOf.java @@ -0,0 +1,12 @@ +import java.math.*; + +public class ValueOf { + public static boolean test() { + BigInteger a = BigInteger.valueOf(123); + BigInteger b = 123; + return a.equals(b); + } + public static void main(String []args) { + System.out.println(test()); + } +}