What is the output?
public class Main { public static void main(String[] args) { int sum; System.out.println(sum); } }
System.out.println(sum); The local variable sum may not have been initialized
The code will generate a compiler error because it tries to print the value of the local variable, sum, before it is assigned a value.