how to input a number with comma, if the input does not contain comma it will ask to input again until it contain comma? example : if you input 2, the program will ask to input again. if you input 2.9 or 1.8 the program will end please do it in java

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 15PE
icon
Related questions
Question

how to input a number with comma, if the input does not contain comma it will ask to input again until it contain comma?
example : if you input 2, the program will ask to input again. if you input 2.9 or 1.8 the program will end

please do it in java

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Files and Directory
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT