Computer Applications
Differentiate between length and length()
Java Arrays
ICSE 2010
120 Likes
Answer
| length | length() |
|---|---|
| length is an attribute i.e. a data member of array. | length() is a member method of String class. |
| It gives the length of an array i.e. the number of elements stored in an array. | It gives the number of characters present in a string. |
Answered By
75 Likes
Related Questions
Differentiate between Linear search and Binary search
Differentiate between Selection sort and Bubble sort
Write a program in Java to store 20 numbers (even and odd numbers) in a Single Dimensional Array (SDA). Calculate and display the sum of all even numbers and all odd numbers separately.
Write a program in Java to store 20 temperatures in °F in a Single Dimensional Array (SDA) and display all the temperatures after converting them into °C.
Hint: (c/5) = (f - 32) / 9