Hi!
I want to learn
java but I have a few questions.
1- I know about data type(Int, double, float....),
but I do not know how an object works like a
type, and what does it mean? How does it work?
class Object{
object myObject;
}
--------------------------------------
2- Object reference
Box b1=new Box;
Box b2=b1;
I know b1 and b2 both have the same value because they
refer to the sme Object(box). but if we have this:
Box b1=new Box;
Box b2=b1;
b1=null;
//b1 has been set to null, but b2
//still points to the original object.
my question is if b1=null, but why b2 still points to orignal object(Box)
---------------------------------------------
3- I have problem whit private keyword. I know what
dose it it mean , but I do not know how dose it
work and when we should write private. and how can we hide our code whit private.
thanks