Find index of double number delimiter
The problems with the first approach


int pos = amount.indexOf(',') == -1 ?
                (amount.indexOf('.') == -1 ? 0 : amount.indexOf('.'))
                : amount.indexOf(',');



are that:


It's not that easily readable; the ternary operator has value when what is tested is simple enough. But when you start nesting them, it often degrades clarity.
The index is calculated two times, one to test whether it is -1 or not, and the second time to return the value.


As such, the second approach


int pos = amount.indexOf(',');
if (pos == -1) pos = amount.indexOf('.');
if (pos == -1) pos = 0;



is the most preferable between the two, mainly for clarity. You should consider putting that into a utility method.

There would be other approaches like using a regular expression, but another good one would to not traverse the string potentially 2 times, and instead of looking whether the string has a certain character, loop through each character and see if it is one of the potential delimiters. With Java 8, you could have

int pos = amount.chars().filter(c -&gt; c == '.' || c == ',').findFirst().orElse(0);


And you could write explicitly the for loop for Java &le; 7.

Final point: having a position of 0 when neither , nor . are present in the String can be confusing; 0 is a valid index value for a string, and it can imply that the delimiter was the first character of the string. If you consider ".25" (that could be a valid representation of a double number, the 0 before being implied), the code would consider this as if having no delimiter.