aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Java Basics (GATE - CS)
  • Which of the following functions is/are valid in Java for...
Multiple choice

Which of the following functions is/are valid in Java for Strings?

  1. valueOf()

  2. toCharArray()

  3. toIntArray()

  4. Both (1) and (2)

  5. Both (1) and (3)

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Both 1 & 2 options are valid functions in Java. So this is the correct answer.

Keep practicing — related questions

  • Which of the following statements is/are correct?
  • Which of the following functions cannot be invoked using the object of String class?
  • Which of the following functions cannot be invoked using the object of String class?
  • Which of the following functions cannot be invoked using the object of String class?
  • Which of the following methods is used to convert a given string to a new character array?
  • Which method converts all the characters in a String object into a character array?
  • Which of the following statement(s) is/are correct? A. valueOf() is a static method. B. toString() is overr...
  • Which of the following functions is used in Java to extract more than one character at a time?
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Java Core Classes and Threads (1473 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy