Question: In java please. Find the StringTokenizer class in the Java API documentation. Run the example code I wrote on using the StringTokenizer. Watch the video

In java please.

Find the StringTokenizer class in the Java API documentation.

Run the example code I wrote on using the StringTokenizer.

Watch the video I posted on using the StringTokenizer.

Code all this in one class with only the main( ) method.

Create a project in BlueJ to accomplish the following tasks. You only need to write a Driver with the main( ) method.

For each of the following 1-4 read a new line of text from the keyboard.

1) Read in a line of text from the keyboard that uses the space as the token delimiter.

Create an instance of the StringTokenizer using the line of text and the space as a delimiter.

Print how many tokens are in the line.

Print each token.

2) Create an instance of the StringTokenizer using a new line of text that uses a comma as a delimiter

Print how many tokens are in the line.

Print each token.

3) Create an instance of the StringTokenizer using a new line of text. Use comma as the delimiter and count the delimiters as a token.

Print how many tokens are in the line.

Print each token.

4 Create an instance of the StringTokenizer using a new line of text and more than one delimiter

Print how many tokens are in the line.

Print each token.

5) Create a text file with at least five lines of text that has values for a Student, one per line where each

value is separated by a comma.

Example: Sara,Rustoff,8001233323,65,3.4

Use a comma as a delimiter (not a space). and

Read the file line bt line and for each line you read, create a StringTokenizer and print each token.

Sample output:

Sara Rustoff 800123323 65 3.4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!