Given explaination on DVD array public int releaseYear is Integer data type so in the constructor of class they accept releaseYear as String data type and assigning it to integer data type this is compile time error. they should accept releaseYear as Integer.
https://leetcode.com/explore/learn/card/fun-with-arrays/521/introduction/3236/
// The actual code for creating an Array to hold DVD's.
DVD[] dvdCollection = new DVD[15];
// A simple definition for a DVD.
public class DVD {
public String name;
public int releaseYear;
public String director;
public DVD(String name, String releaseYear, String director) {
this.name = name;
this.releaseYear = releaseYear;
this.director = director;
}
public String toString() {
System.out.println(
this.name + ", directed by " + this.director + ", released in " + this.releaseYear));
}}