権威のある1z1-809日本語版サンプル & 合格スムーズ1z1-809試験関連情報 | 正確的な1z1-809関連日本語版問題集多くの人は結果が大丈夫で過程だけ重要ですって言いますが。Oracleの1z1-809試験にとってはそうではない。Oracleの1z1-809試験に合格するのはIT業界で働いているあなたに利益をもらわせることができます。もしあなたが試験に合格する決心があったら、我々のOracleの1z1-809ソフトを利用するのはあなたの試験に成功する有効な保障です。我々のOracleの1z1-809ソフトのデモをダウンロードしてみて我々MogiExamのあなたに合格させる自信を感じられます。 Oracle Java SE 8 Programmer II 認定 1z1-809 試験問題 (Q135-Q140):質問 # 135
Given:
class UserException extends Exception { }
class AgeOutOfLimitException extends UserException { }
and the code fragment:
class App {
public void doRegister(String name, int age)
throws UserException, AgeOutOfLimitException {
if (name.length () < 6) {
throw new UserException ();
} else if (age >= 60) {
throw new AgeOutOfLimitException ();
} else {
System.out.println("User is registered.");
}
}
public static void main(String[ ] args) throws UserException {
App t = new App ();
t.doRegister("Mathew", 60);
}
}
What is the result?
User is registered.
A. A compilation error occurs in the mainmethod.
B. A UserExceptionis thrown.
C.
D. An AgeOutOfLimitExceptionis thrown.
正解:D
質問 # 136
Which two methods from the java.util.stream.Stream interface perform a reduction operation? (Choose two.)
A. distinct ()
B. peek ()
C. filter ()
D. collect ()
E. count ()
正解:D、E
解説:
References:
質問 # 137
Given the code fragment:
What is the result?
A. 4000 : 1000
B. 4000 : 2000
C. 1000 : 4000
D. 1000 : 2000
正解:A
質問 # 138
Given the code fragment:
Stream<Path> files = Files.walk(Paths.get(System.getProperty(“user.home”))); files.forEach (fName -> { //line n1 try { Path aPath = fName.toAbsolutePath(); //line n2 System.out.println(fName + “:”
+ Files.readAttributes(aPath,
Basic.File.Attributes.class).creationTime
());
} catch (IOException ex) {
ex.printStackTrace();
});
What is the result?
A. A compilation error occurs at line n1.
B. A compilation error occurs at line n2.
C. The files in the home directory are listed along with their attributes.
D. All files and directories under the home directory are listed along with their attributes.
正解:D
質問 # 139
Given the code fragment:
Assume that dbURL, userName, and passwordare valid.
Which code fragment can be inserted at line n1to enable the code to print Connection Established?
A. Properties prop = new Properties();
prop.put ("userid", userName);
prop.put ("password", password);
prop.put("url", dbURL);
con = DriverManager.getConnection (prop);
B. con = DriverManager.getConnection (dbURL);
con.setClientInfo ("user", userName);
con.setClientInfo ("password", password);
C. Properties prop = new Properties();
prop.put ("user", userName);
prop.put ("password", password);
con = DriverManager.getConnection (dbURL, prop);
D. con = DriverManager.getConnection (userName, password, dbURL);