Array : Why Animals[] animals = new Cat[5] compiles, but List Animal animals = new List Cat () does

Channel:
Subscribers:
76,600
Published on ● Video Link: https://www.youtube.com/watch?v=ZsPrSiYuA1I



Duration: 1:34
4 views
0


Array : Why Animals[] animals = new Cat[5] compiles, but List Animal animals = new List Cat () does not?
To Access My Live Chat Page,
On Google, Search for "hows tech developer connect"

As promised, I'm going to share a hidden feature with you.
This is a YouTube's feature which works on Desktop.
First, Make sure the video is currently in playing mode.
After that, type the word 'awesome' on your keyboard.
Your YouTube progress bar will transform into a flashing rainbow.

A brief presentation of myself,
Hi, my name is Delphi, nice to meet you.
I am at your disposal to help you with any questions you have.
Array : Why Animals[] animals = new Cat[5] compiles, but List Animal animals = new List Cat () does not?
I am available to answer your more detailed queries via comments or chat.
Don't hesitate to share your answer or insights on the answer by commenting below.
I will express my appreciation for your answer by 'hearting' it.
Array animals () Cat Animal : new List does Cat[5] animals = new Animals[] Why List compiles, = not? but




Other Videos By Hey Delphi


2023-04-20C# : Does using parameterized SqlCommand make my program immune to SQL injection?
2023-04-20HTML : Why @import is not advisable to link css?
2023-04-20Django : Why doesn't this Django logging work?
2023-04-20C++ : Why does boost::asio::io_service not compile with std::bind?
2023-04-20NodeJS : How to fix Lint problems with --fix in Firebase Functions
2023-04-20SQL : Is it feasible to improve performance of SQL server with caching?
2023-04-20NodeJS : How to brew install specific version of Node?
2023-04-20Windows : How do I open the default mail program with a Subject and Body in a cross-platform way?
2023-04-20C# : How to loop through a SortedList, getting both the key and the value
2023-04-20NodeJS : How to unit test a socket.io middleware that works with cookies
2023-04-20Array : Why Animals[] animals = new Cat[5] compiles, but List Animal animals = new List Cat () does
2023-04-20Windows : How to remove spaces from file names (in bulk)
2023-04-20C++ : Can `consteval` delegating constructor be called from an ordinary constructor?
2023-04-20HTML : Is there a "texbox content changed" DOM event?
2023-04-20NodeJS : How to create assocations in Sequelize migrations?
2023-04-20jQuery : How to access an array in a JSON object?
2023-04-20R : How to use biglm with more than 2^31 observations
2023-04-20SQL : How to delete all dependent rows
2023-04-20CSS : How can I change the visited links color in Chrome?
2023-04-20SQL : Could not find prepared statement with handle 0. (SQL error)
2023-04-20C# : How to prevent a .NET application from loading/referencing an assembly from the GAC?