I'm trying to write a Java code equivalent of the below Javascript code (convert JS to Java)
JavaScript Code (it reverses an Array and converts to/forms a Big Integer to the base decimal):
var decimal=bigInt.fromArray(binArr.reverse(), 2);
Java code I tried:
BigInteger bigint1=new BigInteger(Collections.reverse(Arrays.asList(a)),2);
(using a syntax I saw online,but I couldnt proceed anything beyond that)
Could you provide some inputs on this?