Java – The meaning of a single plus sign in an array

The meaning of a single plus sign in an array… here is a solution to the problem.

The meaning of a single plus sign in an array

Watching this tutorial I see that at the end of MainActivity.java there is an array that I understand, but don’t know what the last + sign does

String Slecteditem= itemname[+position];

I

removed the +, I think it works the same way, but not sure if there’s a purpose I can’t see.

Solution

+ is the unary addition operator. There is no need here because an array index can never be negative

Related Problems and Solutions