title: How to compare values between string and BigInteger in java
body: <pre><code>String str="1234";
  String str2="1234";
  BigInteger bigInt=new BigInteger("1234");
  Object v1=str;
  Object v2=str2;
  Object v3=bigInt;
  System.out.println("Condition1==&gt;&gt;"+v1.equals(v2));
  System.out.println("Condition2==&gt;&gt;"+v1.equals(v3));`
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Condition1==&gt;&gt;true
  
  Condition2==&gt;&gt;false
  </code></pre>
  
  <p>Why the second condition( v1.equals(v3) ) result is false even though the values are same?.What is the difference between two conditions?
  How to make the second condition result to true?</p>