JAVA JAVA JAVA . I need to convert a string input to int array, for example...

50.1K

Verified Solution

Question

Programming

JAVA JAVA JAVA . I need to convert a string input to int array,for example if user enters 12 / 27 / 2020 , I want to store eachvalue in a separate array and add them afterwards.

Answer & Explanation Solved by verified expert
3.9 Ratings (768 Votes)
For converting string to an int you can use the java methodIntegerparseIntBut this is valid only for a string which is of length more than0 and is a valid integerThat is why in you case we    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students