Computer Science, asked by ammy7762, 1 year ago

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 sushanths
0
Answer isssssssss zero 0
Similar questions