I am trying to iterate through a 2D array of ints and change all of their values from binary form to decimal form and store those values. To be more clear: I have a bunch of different int values which are all technically in binary form but their values are stored as ints. For instance, I might have a variable int example1 = 10001110 — where the chars form a binary number but it’s still a primitive int. So again, I need to convert those values from binary to decimal form and store them as ints. To make your lives a bit easier/more straightforward: the array that currently contains the ints has 8 rows and 2 columns: all of whose entries are in binary int form.
Thanks guys.
Iterate through your array of binary strings and convert them, then store that in a new array.
Integer.parseInt(binaryString, 2);