The main method's first parameter is file1 and the second is file2. file1 contains words separated by spaces. Write to file2 a comma-separated list of words longer than 6 characters. file2 should not end with a comma. Close the streams. Example output to file2: lengthy,shortened,abbreviation
You must be signed in to leave a comment
13 January 2021, 16:48
Input (from File1) Alcool television speciality Bottle of wine Pencilcase Output (in the File2) television,speciality,Pencilcase Notice that input words in File1 are separated by spaces AND newlines.
21 April 2021, 06:11
thanks for this hint!
20 April 2019, 22:14
22 February 2021, 11:57
21 December 2018, 21:06
Do not remove punctuation marks. if the input is: This costs 1 dollar, but this is 12. The variable is called file1. 110 is a number sleventy. Ariable. Notice the ',' after dollar. This counts as towards the overall length of the word. The output for this should be: dollar,,variable,sleventy.,Ariable.