Rohit
Posts: 38
Nickname: rohit
Registered: May, 2002
|
|
Thats Y I luv to play different things with java
|
Posted: Dec 10, 2002 4:02 AM
|
|
Advertisement
|
Well guys,
Seems a little thing , but I have missed this in last 5 yrs,Say I have a class with a public element say of type int in it,
<java> public class First{ public int i; }
</java>
and another class which access this public element of first class(say it prints this elemnts value in main).Perfectly legal,isnt it?
<java> public class Second{ public static void main(String []){ System.out.println(new First().i); } } </java>
Now if I change this public int of d luck.
Sonny2B+%0D%0A++++++++++++return+0%3B++++++++%0D%0A++++++++else+if+%28n+ %3C+0%29++++++++++++%0D%0A++++++++++++return+n+%2B+sum%28%2B%2Bn%29%3B++++++++%0 D%0A++++++++else%0D%0A+++++++++++ret
|
|