X1279: Java String

What is wrong with this code?

String x;
if (x.length() > 0)
    System.out.println("Hello "+x);

Your Answer:

Select one answer:


Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.