Here's my problem. I'm reading in a string of numbers from the user using the scanner class in the main method. I assign that to a variable "s". I pass "s" to a method that converts the String (let's say its a string of 10 numbers) and trying to convert that to an array. The user knows to input 10 numbers so the array length can stay constant at ten. My problem is that since I call scanner in the main method java can't recognize the call in the method. Likewise, if i call scanner in the method I am trying to create, I have nothing to pass to it from the main method. Any suggestions?

Please if you could put your code here it will be really helpful for me to understand along with the errors messages thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.