0
I have made a program for understanding this operator bt can anyone explain why in 2nd case it is giving answer 0??
5 odpowiedzi
+ 6
oops sorry
int x; //x is null and null is equivalent to 0
//in the obj1 you set argument x to this.x
while this.x is null(or 0) but System.out.print(x) just take this.x so this is why it print 0 out
//Da heck my grammar a lot
(I spoke in the word of another programming language)
+ 5
I'm not sure with java bc I don't like it
You assign x into int
but no value given yet so it is undefined
and undefined kinda like 0 in computer
0
can uh plz elobarate it??
0
but i am giving it value 10 like
ob.s (10);
0
then why it is giving 10 in ist case @Very_Hard