Normally novice programmers import Java Library Files using wildcard operator. For example, if someone wants to use files import all Library Files of Java's IO as, "import java.io.*". It creates pressure on compiler for loading all the library files. It is always suggested to import only the specific library file which is going to be used. Now, this can be used in two way, by using import keyword or by using the whole library location each time. As an example, if I want to use the Buffered Reader as a stream reader I can use as 1. import java.io.BufferedReader; 2. in the program not as a header, as java.io.BufferedReader File = new java.io.BufferedReader(...) So, in these two ways a Library File can be used. I think if first method is used the compiler just need to import the file for the whole running time, but if the second method is used compiler needs to import the library each and every time the program uses the library file. That creates extra load on compiler.
Good helps for java lovers. Why dont you use Label to categorize the types of posts, that will help ur readers to find out specifiq types posts like this one is about JAVA Tutorial. Its only a suggestion apu.
ReplyDeleteThanks for the sugggestion Tanmay bhai. I will keep it in mind. Actually I didn't use label before. I will give it a try.
ReplyDelete