we are declaring variable first2 as
String so the ternary operator should return String type value but you are returning boolean if the condition is true and an integer if the condition is false
to clear this, either convert them to String or declare first2 as Object like this
hope this helps
SCJP 6 [86%], OCPWCD [84%], OCEJPAD [83%]
If you find any post useful, click the "plus one" sign on the right