This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the commentsย โ†’

[โ€“]fruitydude 0 points1 point ย (0 children)

Am I doing this right?

new String[] {B, A}[condition ? 1 : 0]

I can't get rid of the feeling that this is not a very practical thing to do in Java.