What is the output of the following Java statements?

```
//String method examples
String str = "Java Programming!";
System.out.println(str.equals("Java Programming!"));
System.out.println(str.toLowerCase());
System.out.println(str.toUpperCase());
System.out.println(str.substring(5,8));
System.out.println(str.lastIndexOf("m"));
```


true
java programming!
JAVA PROGRAMMING!
Pro
12

Computer Science & Information Technology

You might also like to view...

To access an array element, use the array name and the element's

A) name. B) data type. C) value. D) subscript. E) size declarator.

Computer Science & Information Technology

Consider classes A, B and C, where A is an abstract superclass, B is a concrete class that inherits from A and C is a concrete class that inherits from B. Class A declares abstract method originalMethod, implemented in class B. Which of the following statements is true of class C?

a. Method originalMethod cannot be overridden in class C—once it has been implemented in concrete class B, it is implicitly final. b. Method originalMethod must be overridden in class C, or a compilation error will occur. c. If method originalMethod is not overridden in class C but is called by an object of class C, an error occurs. d. None of the above.

Computer Science & Information Technology

The yellow item in the accompanying figure can contain all of the following EXCEPT ____.

A. other divs B. multimedia content C. other Web pages D. forms

Computer Science & Information Technology

When cell C3 containing the formula =B6*C8 is copied to cell D2, the formula in cell D2 is ________

A) =B6*C8 B) =C5*D8 C) =B6*B7 D) =C5*D7

Computer Science & Information Technology