Sun Aug 09, 2009 10:29 pm
public static void main(String[] args) {
byte[] arr=new byte[3];
byte[] x= calc(arr);
// in this case x = arr ( not null);
}
public static byte[] calc (byte[] arr)
{
//do something here.
return arr;
}
public static void main(String[] args) {
byte[] arr = null;
byte[] x = calc(arr);
// in this case arr = null
System.out.println(x.length);
System.out.println(arr);
}
public static byte[] calc(byte[] arr) {
arr = new byte[3];
//do something here.
return arr;
}
3
null
Sun Oct 21, 2012 1:38 pm
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.