What is the correct way to invoke methods on variables in Java that are strings?
A) Methods can only be invoked on string constants, not on variables.
B) For each method there is a special operator that must be used.
C) There are no methods available in Java for string variables.
D) Invoke them using the variable name and the dot (.) notation.
Correct Answer:
Verified
Q114: What is the output of the following
Q115: Which one of the following expressions can
Q116: How do you compute the length of
Q117: How do you extract the first 5
Q118: What is the output of the following
Q119: Which of the methods below are static
Q120: What is the output of the following
Q121: Assume the following variables have been declared
Q123: Suppose a phone number, stored as a
Q124: What is the output of the following
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents