I have the following:
int count = args.length;
Strange as it might seem I want to find out the array length without using the length field. Is there any other way?
Here’s what I already (without success) tried:
int count=0; while (args [count] !=null) count ++;
int count=0; while (!(args[count].equals(""))) count ++;}
How about
Arrays.asList(yourArray).size();?