1.

Which of this method of class String is used to obtain a length of String object?(a) get()(b) Sizeof()(c) lengthof()(d) length()I got this question in unit test.Query is from String Handling Basics in portion String Handling of Java

Answer»

The correct CHOICE is (d) length()

To EXPLAIN: Method length() of string class is USED to get the length of the OBJECT which invoked method length().



Discussion

No Comment Found

Related InterviewSolutions