Question
Stock exchanges often make data available in the form of text files in which each line contains the date (according to the format month/day/year) followed
Stock exchanges often make data available in the form of text files in which each line contains the date (according to the format month/day/year) followed by the different values of a share (maximum value for the day, minimum value, etc. .) separated by commas (CSV). For examples, refer to Microsoft Money Central [1].
Write a Java program containing at most 10 lines, which automatically selects the year and the second monetary value. Your program must not contain any "for" or "while" statements. It must rely entirely on the java.util.regex package and use, at most, a single regular expression.
If your program runs like this:
java myprogram 12/12/2005,43.45,32.1, you should get on the screen: 2005 32.1.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started