文件名称:java英语面试题大集合
文件大小:227KB
文件格式:DOC
更新时间:2016-03-18 03:28:34
java 英语 面试题
Q1. How could Java classes direct program messages to the system console, but error messages, say to a file?. The class System has a variable out that represents the standard output, and the variable err that represents the standard error device. By default, they both point at the system console. This how the standard output could be re-directed: Stream st = new Stream(new FileOutputStream("output.txt")); System.setErr(st); System.setOut(st);