oop - Creating an object differences java -


this question has answer here:

i'm sure question have been answered not sure term search.

i unsure of difference between :

  jpanel = new jpanel();   = new jpanel(); 

with second line need declared variable @ top of class?

can please attach link can find out topic. know basic.

there 3 cases : declaration, initialization, , (declaration, , initialization) :

this declaration of object:

jpanel a; 

this initialization of object :

a = new jpanel(); 

and can make both of them in 1 step :

jpanel = new jpanel(); 

Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -