Question: Create a class called CapWord that has a one parameter constructor that accepts a string and stores it in an instance variable called data. Write
Create a class called "CapWord" that has a one parameter constructor that accepts a string and stores it in an instance variable called "data". Write an instance method called getCapWords() that will return "data" with all letters capitalized. Assume and ArrayList called names exist, and contains a bunch of names. Write code to create an array and copy the names from the ArrayList to the array. Write Java code segment that reads a text file called "data.txt" and prints each unique word in the file. Words are separated by space. Explain the concept of Iterator with an example
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
