View Single Post
  #4 (permalink)  
Old 11-14-2007, 06:22 AM
JT4NK3D's Avatar
JT4NK3D JT4NK3D is offline
Member
 
Join Date: Nov 2007
Posts: 50
JT4NK3D is on a distinguished road
Well, .length (obviously) gives the length, but you want to know what happens if you .length a number? on an array, i think it would return the number of elements/items in the array. on a number, i'm guessing either it would return the number of digits( so int ten = 10; System.out.println(ten.length); would return 2) or it would return a compile time error because it might just be ment to use on strings.
Reply With Quote