Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions