I have been working with Java a couple of years, but up until recently I haven\'t run across this construct:
int count = isHere ? getHereCount(index) : getAw
Not exactly correct, to be precise:
That "returned" is very important. It means the methods must return a value and that value must be assigned somewhere.
Also, it's not exactly syntactically equivalent to the if-else version. For example:
String str1,str2,str3,str4;
boolean check;
//...
return str1 + (check ? str2 : str3) + str4;
If coded with if-else will always result in more bytecode.