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

c++ - CPP, 'X' button listener -

shared memory - gstreamer shmsrc and shmsink with h264 data -

.net - Bulk insert via Dapper is slower than inserting rows one-by-one -