!7 import java.nio.channels.*; import java.nio.file.*; static volatile S status; p { File path = dummyFileForLockTest(); FileChannel channel = FileChannel.open(toPath(path), StandardOpenOption.CREATE, StandardOpenOption.WRITE); temp FileLock lock = channel.tryLock(); if (lock == null) print(status = "Couldn't lock."); else print(status = "Locked!"); bot("Lock a file."); } answer { if "status" ret status; }