← Back to Question List
Java Quiz #4
String Comparison
What is the output of this code?
📄 Code
1public class Main {2 public static void main(String[] args) {3 String a = new String("hello");4 String b = new String("hello");5 System.out.println(a == b);6 System.out.println(a.equals(b));7 }8}