But it does not hold true anymore…
No, they are like Ronaldo & Ronaldinho… They compete but in a sweet way. They are brothers and complements each other’s cons.
Let’s Get Started And See How Do They Do It Differently
1 # Creating An Empty Array
let jsArray = ; // Sweet ... easy ... it works
int javaArray = new int;
// Compilation Error : Array Initializer Expected
The reason for the above error with java arrays is that by nature Arrays in Java are fixed in length. So we must pass the length of an array while creating it.
// Right way to create an empty Java Array
int javaArray = new int; // By passing the array length