1)myarray.length();
2)myarray.length;
3)myarray.size
4)myarray.size();
Answer 2) myarray.length;
The String class has a length() method to return the number of characters. I have sometimes become confused between the two.
Java 1.2 course notes and work plan edited from several sources. This is a work in process and is constantly being refined, though may not be updated to the latest Java releases. Included is a collection of Java certification practise questions and answers.
1)myarray.length();
2)myarray.length;
3)myarray.size
4)myarray.size();
Answer 2) myarray.length;
The String class has a length() method to return the number of characters. I have sometimes become confused between the two.
No comments:
Post a Comment