Rohit
Posts: 38
Nickname: rohit
Registered: May, 2002
|
|
Re: Thats Y I luv to play different things with java
|
Posted: Dec 11, 2002 11:21 PM
|
|
<To_Bill> My previous post gets mixed up with some other,dont know,whats the reason , but ,it gets corrupted twice,I m posting it again,see how it goes </To_Bill>
Well guys,
Seems a little thing , but I have missed this in last 5 yrs,Say I have a class with a public element sat 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 valu String [] stuff = { "'Twas", "brillig", "and", "the", "slithy", "toves" }; return stuff; } public static void main(String args[]) { String [] gotStuff = new ArrayOfHope().getSomeStuff(); System.out.println("Here is the stuff I got:"); for( int i = 0; i < gotStuff.length; i++ ) System.out.println( i + ". " + gotStuff ); } }[/java]2B+public+static+void+main%28String+args%5B%5D%29%0D%0A+++%7B%0D%0A++ ++++String+%5B%5D+gotStuff+%3D+new+ArrayOfHope%28%29.getSomeStuff%28%29%3B%0D%
|
|