5 years ago in Java Strings

Which of these method of class String is used to obtain length of String object?

[A] get()
[B] Sizeof()
[C] lengthof()
[D] length()
Loading...
Next Question

Overall Stats

Attempted 308
Correct 177
Incorrect 31
Viewed 100

Answers

Guest
Guest
Shamsa hafeez
Shamsa hafeez - 6 days ago

Shamsa hafeez from Lahore, Pakistan is saying length() is correct answer

bruh
bruh - 1 month ago

bruh from Guwahati, India is saying length() is correct answer

Assaad Amine
Assaad Amine - 1 month ago

Assaad Amine from Casablanca, Morocco is saying Sizeof() is correct answer

Zo Go
Zo Go - 1 month ago

Zo Go from Casablanca, Morocco is saying length() is correct answer

Vaibhav Bisht
Vaibhav Bisht - 1 month ago

Vaibhav Bisht from Dehradun, India is saying Sizeof() is correct answer

Related Questions

Which is a valid declarations of a String?

  • [A] String s1 = null;
  • [B] String s2 = 'null';
  • [C] String s3 = (String) 'abc';
  • [D] String s4 = (String) '\ufeed';

Which of the following statements are incorrect?

  • [A] String is a class
  • [B] Strings in java are mutable.
  • [C] Every string is an object of class String.
  • [D] Java defines a peer class of String, called StringBuffer, which allows string to be altered.