Find out the 2 numbers which gives the highest product
Bugs

Your negative cases are wrong.

        if (arr[i] &lt; 0) {
            secondNegMax = firstNegMax;
            firstNegMax = arr[i];


Here you always overwrite the current maximums...

            if (arr[i] &gt; firstNegMax) {
                secondNegMax = firstNegMax;
                firstMax = arr[i];
            } else if (arr[i] &gt; secondNegMax) {
                secondNegMax = arr[i];
            }


And here you check if a certain value is HIGHER than the max (which is negative, so 0 is higher than all negatives!). Neither of this is going to result in a good end result.

Aside from that, there seems to be no explicit check for verifying that you have at least an array of length 2 and that the output consists of either "two positive numbers" or "two negative numbers". Other than that, it's working fine.

Algorithm

I've got only one algorithmic improvement, and that's this one...

        if (arr[i] &gt; 0) {
            if (arr[i] &gt; firstMax) {
                secondMax = firstMax;
                firstMax = arr[i];
            } else if (arr[i] &gt; secondMax) {
                secondMax = arr[i];
            }
        }

        if (arr[i] &lt; 0) {
            secondNegMax = firstNegMax;
            firstNegMax = arr[i];
            if (arr[i] &gt; firstNegMax) {
                secondNegMax = firstNegMax;
                firstMax = arr[i];
            } else if (arr[i] &gt; secondNegMax) {
                secondNegMax = arr[i];
            }

        }


Here, you first check if the current element is positive... and then, later, you check if it's negative. Now, there's nothing wrong with that, but if you know that this element is positive, then there is no need for the negative check anymore. Use else-if here.

Naming

Your shorthand should be expanded, firstNegativeMax reads better than firstNegMax. max is well understood as "maximum", neg isn't as well understood. Aside from that, assigning arr[i] to a local variable with a name like "currentNumber" or "currentElement" would help readability. (Better yet, follow Martin R's advice and make it a for-each loop.)