Multiple choice technology programming languages

What are the types returned by the ServletContext method getResource and getResourceAsStream?

  1. 1) ServletContext doesn't have one of these two methods.

  2. 2) String and InputStream

  3. 3) URL and InputStream

  4. 4) URL and StreamReader

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The ServletContext interface defines getResource(String path), which returns a URL object, and getResourceAsStream(String path), which returns an InputStream object.