Question: (1) Implement the following methods of String class with respective methods: String toUpperCase(String str) int indexOf(String str, char ch) String concat(String str1, String str2) boolean
(1) Implement the following methods of String class with respective methods: String toUpperCase(String str) int indexOf(String str, char ch) String concat(String str1, String str2) boolean equals(String str1, String str2) int compareTo(String str1, String str2) boolean startsWith(String str, String prefix) Note that only methods like "length()", "charAt()" of String object can be used. (2) Write a method intToWeekDay(integer) that returns a week day if integer is belongs to {0,1,...,6} by using enumeration type. For example, calling intToWeekDay(0) returns "Sunday". in java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
