최신Oracle Upgrade to Java SE 7 Programmer (1Z1-805日本語版) - 1Z1-805日本語무료샘플문제
문제1

public static void main(String[] args) {
String source = "d:\\company\\info.txt";
String dest = "d:\\company\\emp\\info.txt";
//insert code fragment here Line **
} catch (IOException e) {
System.err.println ("Caught IOException: " + e.getmessage();
}
}


public static void main(String[] args) {
String source = "d:\\company\\info.txt";
String dest = "d:\\company\\emp\\info.txt";
//insert code fragment here Line **
} catch (IOException e) {
System.err.println ("Caught IOException: " + e.getmessage();
}
}

정답: B,C
문제2


정답: D,E
설명: (KoreaDumps 회원만 볼 수 있음)
문제3


정답: C,D
설명: (KoreaDumps 회원만 볼 수 있음)
문제4


정답: B,D
설명: (KoreaDumps 회원만 볼 수 있음)
문제5

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");
}


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");
}

정답: A,D,E
설명: (KoreaDumps 회원만 볼 수 있음)
문제6


정답: A
설명: (KoreaDumps 회원만 볼 수 있음)
문제7

public static void main(String[] args) {
Path tempFile = null;
try {
Path p = Paths.get("emp");
tempFile = Files.createTempFile(p, "report", ".tmp");
try (BufferedWriter writer = Files.newBufferedWriter(tempFile, Charset.forName("UTF8")))){
writer.write("Java SE 7");
}
System.out.println("Temporary file write done");
} catch(IOException e) {
System.err.println("Caught IOException: " + e.getMessage());
}
}


public static void main(String[] args) {
Path tempFile = null;
try {
Path p = Paths.get("emp");
tempFile = Files.createTempFile(p, "report", ".tmp");
try (BufferedWriter writer = Files.newBufferedWriter(tempFile, Charset.forName("UTF8")))){
writer.write("Java SE 7");
}
System.out.println("Temporary file write done");
} catch(IOException e) {
System.err.println("Caught IOException: " + e.getMessage());
}
}

정답: D
설명: (KoreaDumps 회원만 볼 수 있음)
문제8

System.out.println ("Result: " + sdf.format(today) ) ;


System.out.println ("Result: " + sdf.format(today) ) ;

정답: B
문제9

public static void processFile () throws IOException { Try (FileReader fr = new FileReader ("logfilesrc.txt");
FileWriter fw = new FileWriter ("logfilesdst.txt") ) {
int i = fr.read();
}
}


public static void processFile () throws IOException { Try (FileReader fr = new FileReader ("logfilesrc.txt");
FileWriter fw = new FileWriter ("logfilesdst.txt") ) {
int i = fr.read();
}
}

정답: B
설명: (KoreaDumps 회원만 볼 수 있음)