Consider the following code segment.String a = ""; a += "0"; if (a == "0") { System.out.println("a is 0!"); } else if (a == "1") { System.out.println("a is 1!"); } else if (a == "a") { System.out.println("a is a!"); } else { System.out.println("a is something else!"); } Which of the following statements about the code segment is true?It produced "a is 0!" as outputIt produced "a is 1!" as outputIt produced "a is a!" as outputIt produced "a is something else!" as outputIt results in an error because the == operation can not be used with Strings
Answers
Answered by
0
Answer isssssssss zero 0
Similar questions
Chemistry,
8 months ago
Math,
8 months ago
Social Sciences,
8 months ago
English,
1 year ago
Business Studies,
1 year ago
Physics,
1 year ago