III. Assume that a String identifier sentence references the String below
sentence = “This is my first real homework.”;
(5 points)
What is the value of each expression below?
sentence.length()
sentence.charAt(3)
sentence.toLowerCase()
sentence.toUpperCase()
public class Solution {
public static void main(String[] args) {
String sentence = "This is my first real homework.";
System.out.println(sentence.length());
System.out.println(sentence.charAt(3));
System.out.println(sentence.toLowerCase());
System.out.println(sentence.toUpperCase());
}
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
JavaJSPJSF