posted 16 years ago
If the line numbers are not beginning from 1, then you can assume that all the required import statements are there. But if the line numbers start from 1, then you cannot assume that there are required import statements. So if the line number start from 5, and there is use of File class, then you can assume that there is an import java.io.*; statement on the lines not shown. But if the line numbers start from 1, and there is no import java.io.* or java.io.File, and the code uses the File class, then it would be a compilation error...