WaitForCompletion() // some logic that waits for specific state of printer queue}
这门课违反SRP吗?方法StartPrintAndWaitForCompletion做了不止一件事情。我应该删除它并始终分别调用Start()和WaitForCompletion()吗?
public static String executeCommand(String command) { Process p; p = Runtime.getRuntime().exec(command); } BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line