Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In IntelliJ, navigate to the Labs package and create another package named Lab 8 . Create a class in the Lab 8 package called Array.java

In IntelliJ, navigate to the Labs package and create another package named Lab8.
Create a class in the Lab8 package called Array.java with a main method that will do the following: (Note: Document your algorithm as comments near related lines of code)
Input at the command line the following String: Beth,Rick,Jerry,Rick,Summer,Morty(DON'T type the .)
Step 1: Go to Run Edit Configurations
Step 2: Go to Application, you might need to use the + key to find it, and add the program arguments needed.
This will allow that string to be entered into the program when it is run. This string will be stored in the String[] args array in the 0 position.
Use this inputted String and the method .split(",") to create an array of String
objects called tokens. The actual code you will use is below:
String[] tokens = args[0].split(",");
Create another String array called customerName. This array will have eight String
objects.
Create a for loop to copy each element in the tokens array into the customerName

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

Databases Organizing Information Digital And Information Literacy

Authors: Greg Roza

1st Edition

1448805929, 978-1448805921

Students also viewed these Databases questions

Question

Additional Factors Affecting Group Communication?

Answered: 1 week ago