what is difference between length and length()?

Answer Posted / shaik baji

length: It's a built-in property to determine the size of
any array.

lenght(): It's a method of java.lang.String class.
Syntax:
-------
public int length()

It returns the length of the string. The length is equal to
the number of 16-bit Unicode characters in the string.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is nextline method in java?

551


How does the java compiler work?

522


How will you reverse a link list without using recursion?

586


Explain different forms of polymorphism?

646


What do you understand by a Static Variable?

621






What are streams in java 8?

544


How do you override a variable in java?

523


What is the program development process?

555


What are the basics of core java?

540


Explain super keyword in java.

572


What is constructor and virtual function? Can we call a virtual function in a constructor?

672


What is threaded programming and when is it used? : Java thread

526


What is instance means in java?

559


What are advantages of using Java?s layout managers than windowing systems?

1851


What are advantages of exception handling in java?

576