Roman numerals to Arabic number
There is a common pattern followed in all the if-else blocks in the given code. This can be moved to a function or a loop.

Here the pseudo code does this using a loop. As the condition in each successive block is cumulative, it is tracked as a separate variable modified by each successive iteration.

arr = {"I", "V", "X", "L", "C", "D", "M"}; // Store these in an array
for (c = 0; c &lt; 15; c++) {
    findRomans = romans.get(c);
    condition = false;
    for(index = 0; index &lt; size(arr); index++) {
        condition = condition || romans.get(c + 1).equals(arr[index]);
        if (findRomans.equals(arr[index])) {
            int multiplier = condition ? 1 : -1;
            arabic += multiplier * defaultArabics.get(index);
        }
    }
}
return arabic;


This code is just more concise than the original one. There is no efficiency gained here.