Java #6 - Array (Part-1)
What is an array?
A variable can store only one value. Consider a program where we have to save the grade of 50 students, we need to have 50 variables which is not very convenient to create those many variables and use them. In such scenarios, using...
subodhsingh.hashnode.dev3 min read
Niraj Kumar Gangale
Empowering communities via cloud and education.
I want to ask a question. when does type checking happen in Array at Compile time or the Runtime?
https://www.baeldung.com/java-generic-array
Then, this should work fine.
int[] firstArray = {"hello", "hello2"};But, this gives Compile time error. Why?