The Artima Developer Community
Sponsored Link

Java Answers Forum
Thats Y I luv to play different things with java

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
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
Reply to this message Reply
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

Topic: java game? Previous Topic   Next Topic Topic: java applets

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use