i am a java begineer and my confusion is:
in c++ we have seen that we can initiliaze the array just by writing this-
int a[5];
but in java we need new operator for array initilzation as-
int a[]=new int[5];
plz explain me in detail the reason for this???
iwannalearn 0 Newbie Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
sam.udo 0 Newbie Poster
jon.kiparsky 326 Posting Virtuoso
lisaroy1 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.