You have to convert both values to BigDecimal and then you can compare it:
BigInteger bi = new BigInteger("1");
BigDecimal db = new BigDecimal(bi);
db.compareTo(new BigDecimal(1.3d));
More Related Contents:
- How do I efficiently iterate over each entry in a Java Map?
- How to sort a List/ArrayList?
- How to force max to return ALL maximum values in a Java Stream?
- How do you cast a List of supertypes to a List of subtypes?
- ConcurrentModificationException for ArrayList [duplicate]
- How to find an object in an ArrayList by property
- How can I sort a List alphabetically?
- Java 8 Nested (Multi level) group by
- How to generate a random BigInteger value in Java?
- Should I return a Collection or a Stream?
- How to handle very large numbers in Java without using java.math.BigInteger
- Simple way to find if two different lists contain exactly the same elements?
- Easiest way to convert a List to a Set in Java
- What is difference between Collection.stream().forEach() and Collection.forEach()?
- How to sort an arraylist of objects by a property?
- How to most elegantly iterate through parallel collections?
- Double calculation producing odd result [duplicate]
- Best way to create a hashmap of arraylist
- Collection Interface vs arrays
- How to remove element from ArrayList by checking its value?
- What is the fastest Java collection with the basic functionality of a Queue?
- Why does integer division by zero 1/0 give error but floating point 1/0.0 returns “Inf”?
- Remove empty collections from a JSON with Gson
- Map that could be iterated in the order of values
- Convert Double to Binary representation?
- Why does TreeSet throw a ClassCastException?
- Shortcut for adding to List in a HashMap
- ArrayList vs. Vectors in Java if thread safety isn’t a concern
- How does ConcurrentHashMap work internally?
- Vector vs Collections.synchronizedList(ArrayList)