Monday, December 09, 2013

Difference between length and length() in Java

length - This is a instance variable of array in java. It returns the length of an array, number of elements stored in an array.

length() -  This is a method in java. It is a static method of String class. It returns the length of a string object.

No comments:

Post a Comment

🧠 10 Powerful ChatGPT Use Cases to Supercharge Your Business in 2025

  🧠 10 Powerful ChatGPT Use Cases to Supercharge Your Business in 2025 In today’s fast-paced digital world, businesses are racing to adopt ...