Results 1 to 2 of 2
- 08-07-2008, 09:40 PM #1
Member
- Join Date
- Aug 2008
- Posts
- 6
- Rep Power
- 0
what does num.length method does?
i was wondering what does num.length method does ?
import java.util.*;
public class array2{
public static void main(String[] args){
int num[] = {50,20,45,82,25,63};
int l = num.length; <--------
int i,j,t;
System.out.print("Given number : ");
for (i = 0;i < l;i++ ){
System.out.print(" " + num[i]);
}
System.out.println("\n");
System.out.print("Accending order number : ");
Arrays.sort(num);
for(i = 0;i < l;i++){
System.out.print(" " + num[i]);
}
}
}
- 08-07-2008, 10:19 PM #2
Similar Threads
-
queue length of Socket
By hemant in forum NetworkingReplies: 6Last Post: 07-13-2008, 06:28 PM -
Integer length
By jithan in forum New To JavaReplies: 1Last Post: 06-12-2008, 03:35 PM -
Demonstration of the variable length arguments
By Java Tip in forum java.langReplies: 0Last Post: 04-17-2008, 07:38 PM -
Determining Midi Length
By Usagi in forum New To JavaReplies: 0Last Post: 12-08-2007, 11:45 PM -
Help with method length
By toby in forum New To JavaReplies: 1Last Post: 07-25-2007, 08:29 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks