FileChannel fc = null;
Path file =Paths.get("C:\\Java\\Chapter.13\\RandomEmployees.txt");
?
Given the two declarations above, write a Java statement that creates a ByteChannel that is cast to a FileChannel. The file shoould be open for read and write operations.
What will be an ideal response?
?fc = (FileChannel)Files.newByteChannel(file, READ, WRITE);
Computer Science & Information Technology
You might also like to view...
A round button that enables you to make one selection from among several choices is called a(n):
A) split button. B) navigation button. C) option button. D) task button.
Computer Science & Information Technology
Which type of exception is thrown if a call to the new operator fails?
a. ArithmeticError b. DivideByZero c. bad_alloc d. MemoryError
Computer Science & Information Technology