Java 教程
Java 實例
以下實例演示了使用 File 類的 file.setReadOnly() 和 file.canWrite() 方法來設置文件只讀:
以上代碼運行輸出結果為:
true false