• Post Reply Bookmark Topic Watch Topic
  • New Topic

Creating an Array with JOptionPane and using display methods and and getNumbers  RSS feed

 
Hudson Reed
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question 1. Not sure how to create the array with JOptionPane (input has to be parsed and then the three numbers stored in an array for retrieval.)



 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Please use the code button; since you are new I have edited your post so you can see how much better it looks. Please always post real code; I can see at least one compiler error in your post. I can see one logic error, too.

What is going wrong? You need to tell us the details, otherwise we can't help, and we don't simply hand out answers, but expect you to do the work.
 
lakmal padmakumara
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Several things to consider ,
According to your code "input" isn't an array.It's a String object .Your arrayLookALike name is "numbers".And That is a wrong way of declaring an array. It should be


JOption method returns a String .So Using these tips try to change your code.You will be having a good time then
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!