View Single Post
  #7 (permalink)  
Old 04-25-2008, 07:28 AM
apfroggy0408 apfroggy0408 is offline
Member
 
Join Date: Dec 2007
Posts: 26
apfroggy0408 is on a distinguished road
I'm pretty familiar with making an array with hardcoded information. But what's confusing me is the array with user input.

Code:
Scanner input = new Scanner(System.in); System.out.println("Enter String to use: "); String list = input.nextLine(); String trimmedword = list.trim(); System.out.println("Enter Index: "); int index = input.nextInt();
Is what I have to start with.

I'm using the trim because I need to able to manipulate this array with the index choice. So I need to turn that trimmed string into an array.

Last edited by apfroggy0408 : 04-25-2008 at 07:32 AM.
Reply With Quote