TEXT FILE CONTAINS: OUTPUT: Africa Asia Australia/Oceania Europe North America S
ID: 3827668 • Letter: T
Question
TEXT FILE CONTAINS:
OUTPUT:
Africa
Asia
Australia/Oceania
Europe
North America
South America
Explanation / Answer
This code is extracting continent which is second intery in each line and printing them in sorted order
basically main is calling method extract field, which is reading file and splitting each line on delimiter(",") and then returning 1st indexed item form the splitted list which is continent name
Display method is then displaying result in sorted order.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.