Nil. Hatamova wrote:This code gives compile error. But i cant find why?
If you have the appropriate import statement, that code snippet should compile without any errors. The FileNotFoundException resides in the java.io package (not in the java.lang package) and therefore an explicit import statement is required.
When you compile a file in java, it tells you EXACTLY why it won't compile. Those error messages mean something. At the very least, you should post it here, and we can help you learn tow to read and interpret them.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
If you want to look young and thin, hang around old, fat people. Or this tiny ad: