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

How to build an AI Agent

  Agents are the most valuable skill in AI and product right now. So why not build one? Here's how: 𝐒𝐭𝐞𝐩 𝟏: 𝐃𝐞𝐟𝐢𝐧𝐞 𝐚 𝐬𝐲𝐬...