Duplicate Question
The question on this page has been marked as a duplicate question.
Original Question
What does this statement print? System.out.println("bc" + 2 + 3)Asked by Lawrence Sweeting
                What does this statement print?
System.out.println(“bc”+2+3)
            
        System.out.println(“bc”+2+3)
Answers
                    Answered by
            oobleck
            
    bc23
because the string is evaluated first, setting the expression type.
print(2+3+"bc") would print 5bc
you know, you could always just execute the statement ...
    
because the string is evaluated first, setting the expression type.
print(2+3+"bc") would print 5bc
you know, you could always just execute the statement ...
                                                    There are no AI answers yet. The ability to request AI answers is coming soon!
                                            
                Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.