To check if a string s contains the prefix "Java", you may write

```
a. if (s.startsWith("Java")) ...
b. if (s.indexOf("Java") == 0) ...
c. if (s.substring(0, 4).equals("Java")) ...
d. if (s.charAt(0) == 'J' && s.charAt(1) == 'a' && s.charAt(2) == 'v' && s.charAt(3) == 'a') ...
```


```
a. if (s.startsWith("Java")) ...
b. if (s.indexOf("Java") == 0) ...
c. if (s.substring(0, 4).equals("Java")) ...
d. if (s.charAt(0) == 'J' && s.charAt(1) == 'a' && s.charAt(2) == 'v' && s.charAt(3) == 'a') ...
```

Computer Science & Information Technology

You might also like to view...

MC Sequences are unpacked with the______operator.

a) :. b) ( ). c) =. d) [ ].

Computer Science & Information Technology

____ a report in the Navigation Pane to open it.

A. Right-click B. Left-click C. Double-click D. none of the above

Computer Science & Information Technology

The objective of _____ is to gather data about project usability, costs, benefits, and schedules.

A. mediation B. fact-finding C. project execution D. project maintenance

Computer Science & Information Technology

When one class subclasses another class, the subclass receives all the same fields and methods that were defined in the parent class via a process called __________

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology