java - Object ob; and Object ob = new Object; -


please explain difference between these two:

1) object ob;

2) object ob = new object();

first declared object:

object ob; 

note declarations not instantiate objects. when object declared, value set null.

second declared , instantiated object:

object ob = new object(); 

in case initialize new object of type object on constructor methods.

quick info can here. can lot of information in various java tutorials.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -