Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Java class called StringFun that: - Takes as a command line argument any number of strings (if you want spaces in your String
Write a Java class called StringFun that:
- Takes as a command line argument any number of strings (if you want spaces in your String you have to use quotes around the argument, for example, This string has spaces in it.
- Performs all 9 of the methods listed below.
- Prints out the results of each method.
1) s.length()
2) s.equals(otherString)
3) s.substring(startIndex, endIndex)
4) s.trim()
5) s.indexOf(subString)
6) s.lastIndexOf(subString)
7) s.charAt(index)
8) s.toLowerCase()
9) s.toUpperCase()
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started