Skip to content

When might an IOError be thrown?

I have never seen a case when an IOError is thrown. The only thing that the docs say about IOError it this: Thrown when a serious I/O error has occurred. There aren’t any subclasses or anything …

How to get info of an FTPFile

I am using ApacheCommons to connect to a server and get information of a specific file. I am looking for a method like FTPFile file = ftpclient.getFile(path); or something like this, so I can give it the path of the file and then be able to get info about that file. By info I mean file.getName() or file.lendt…

How to turn minutes into years and days?

In the textbook it explains how to convert seconds into minutes with how many seconds remain but the question I have is as follows. Write a program that prompts the user to enter the minutes (e.g., 1 billion), and displays the number of years and days for the minutes. For simplicity, assume a year has 365 day…