Java - Memory Management Basics
Identify the error in the following Java code related to heap memory usage:
public class Demo {
public static void main(String[] args) {
int[] arr = new int[5];
arr = null;
System.out.println(arr.length);
}
}