Which of the following statements about Files are true? One of the options is "A new file object can be created by invoking createNewFile method". I didn't select the above option as I felt that a new file can be created in the filesystem by using the createNewFile method. Since the word 'object' was used in the option, I felt it was not the right option, but it is a valid answer according to the author. Kindly give your comments. Regards Sajida
posted 16 years ago
Hi Sajida, I think your right and the question was poorly worded. The <code>File.createNewFile()</code> method returns a boolean not an Object.
------------------ Jane Griscti Sun Certified Programmer for the Java� 2 Platform