+ 2
can objects be used without instantiating??
4 Respuestas
0
No, we can't use without initiation. ....
0
Just to put it another way if there's still confusion. creating the object is like designing a blueprint. Instantiating is building from the blueprint.
0
If you don't want to instantiate an object, for e.g. if you just need to use a methods that will all ways return the same value whatever your object's variable are, you can use the static key word with your method, to bee able to use it like so:
Class.methode () ,without using an instance of the class. When using System.out.println (), you call the println () methode of an OutputStream object declared as static in the System class.
0
u can use "static" class and methods.. so dat u dnt hv to bother about creating object u can use classname.method() directly . bt u can not use obj without instantiated. it will get error SYMBOL not found or something like this