Question
Create a method that takes a two-dimensional array of files names as strings and search for a specific file extension. Then, it returns a list
Create a method that takes a two-dimensional array of files names as strings and search for a specific file extension. Then, it returns a list of the files with the given extension and prints the name of the files.
Handle all corner cases and if there is any expected exception, handle it properly using exception handling technique. Avoid general exception handling.
For example: for the array
A = [first.doc, second.doc, exam.pdf,
resume.pdf, code.csharp, employee.java
]
FileExtension(A, doc) returns a list that contains first.doc and second.doc and prints the names to the console. C# - a programming language
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