Which two try statements, when inserted at line…

Given the code fragment: Which two try statements, when inserted at line ***, enable you to
print files with the extensions.java, .htm, and .jar.

Given the code fragment: Which two try statements, when inserted at line ***, enable you to
print files with the extensions.java, .htm, and .jar.

A.
try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir,”*.{java,htm,jar}”)){

B.
try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir,”*. [java,htm,jar]”)) {

C.
try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir,”*.{java*,htm*,jar*}”))
{

D.
try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir,”**.{java,htm,jar}”)) {



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Serrato

Serrato

A only files, D files and directories