日期:2014-05-20 浏览次数:20819 次
a = a + b; b = a - b; a = a - b;
a = a * b; b = a / b; a = a / b;
a = a ^ b; b = a ^ b; a = a ^ b;
// 递归列出创建时间最早的文件 private void funList(File file) { //log(file); if (file.isDirectory()) { File[] files = file.listFiles(); if (files == null) { return; } else { for (File f : files) { funList(f); } } } else { if (!file.isHidden()) { //deleteArea.setText(""); //deleteArea.setText(file.toString()); log(file); fileDateLists.add(file); } else { // log("隐藏文件:"+file); } } } //delete dir void deleteDir(File file) { if (file.isDirectory()) { File[] files = file.listFiles(); for (int i = 0; i < files.length; i++) { File f = files[i]; if (f.isDirectory()) { deleteDir(files[i]); } else { if (!f.delete()) { System.err.println(f.getAbsolutePath() + "cann't be deleted ."); } } } } if (!file.delete()) { System.err.println(file.getAbsolutePath() + "cann't be deleted ."); } }
Class Demo { synchronized A () {....} synchronized B () {....} }