+ 1
Scanner Objects in java code
Hello I'm new to coding and have a 2 fold query. Firstly. I have a question that asks me to create 2 scanner objects named inText and inNumber to read a text and numeric value. I begin the code with import java.util.Scanner; but where to I put the 2 scanner objects? Secondly, I need to declare a string object named customerName to store a name that uses the inText scanner mentioned with method inText.nextline(); where do I declare the new String object?
2 ответов
+ 12
have a look at my answer in this post
https://www.sololearn.com/Discuss/1145362/?ref=app
0
@Kieran if you're still having problem with it , then put ur code in playground and send it's link here so we could help 🙂