1Z0-805 無料問題集「Oracle Upgrade to Java SE 7 Programmer」

Given the code fragment:
public static void processFile () throws IOException { Try (FileReader fr = new FileReader ("logfilesrc.txt");
FileWriter fw = new FileWriter ("logfilesdst.txt") ) {
int i = fr.read();
}
}
Which statement is true?

解説: (JPNTest メンバーにのみ表示されます)
Given the code fragment:
private static void copyContents (File source, File target) {
try {inputStream fis = new FileInputStream(source);
outputStream fos = new FileOutputStream (target);
byte [] buf = new byte [8192]; int i;
while ((i = fis.read(buf)) != -1) {
fos.write (buf, 0, i);
}
//insert code fragment here. Line **
System.out.println ("Successfully copied");
}
Which code fragments, when inserted independently at line **, enable the code to compile?

正解:A、B、E 解答を投票する
解説: (JPNTest メンバーにのみ表示されます)
Which code fragments print 1?

正解:A、D 解答を投票する
解説: (JPNTest メンバーにのみ表示されます)
Given:
class Fibonacci extends RecursiveTask<Integer> {
final int n;
Fibonacci (int n) { this.n = n }
Integer compute () {
if (n <= 1)
return n;
Fibonacci f1 = new Fibonacci (n - 1);
f1.fork; // Line X
Fibonacci f2 = new Fibonacci (n - 2); // Line Y
return f2.compute() + f1.join;
}
}
Suppose that lines X and Y are transposed:
Fibonacci f2 = new Fibonacci (n - 2); // Line Y
f1.fork; // Line X
What is the likely result?

解説: (JPNTest メンバーにのみ表示されます)
In the Java SE7 API, which method is most commonly used by factories to instantiate objects?

解説: (JPNTest メンバーにのみ表示されます)
Given:
import java.io.*;
public class SampleClass {
public static void main(String[] args) throws IOException {
try {
String dirName = args[0];
File dir = new File(dirName);
File.createTempFile("temp", "log", dir);
} catch (NullPointerException | IOException e) {
e = new IOException("Error while creating temp file");
throw e;
}
}
}
What is the result?

解説: (JPNTest メンバーにのみ表示されます)
Which three objects must a vendor provide implementations in its JDBC driver?

正解:B、E、F 解答を投票する
解説: (JPNTest メンバーにのみ表示されます)
Given the code fragment: SimpleDateFormat sdf = new SimpleDateFormat("zzzz", Locale.US);
System.out.println ("Result: " + sdf.format(today) ) ;
What type of result is printed?

Given the code fragment:
List<Person> pList = new CopyOnWriteArrayList<Person>();
Which statement is true?

解説: (JPNTest メンバーにのみ表示されます)

弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

オンラインサポート時間:( UTC+9 ) 9:00-24:00
月曜日から土曜日まで

サポート:現在連絡