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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!