What is the problem we could face if we be very liberal with importing classes even if we are not using them ? For example <br /> <br /> import java.util.*;<br /> import java.io.*;
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers

 Q1. What is the problem we could face if we be very liberal with importing classes even if we are not using them ? For example

import java.util.*;
import java.io.*;
Core Java
Ans. It makes application little heavy as we are importing classes that aren't required.

It creates class name conflicts as similar name classes might be available across different packages. In case of such conflicts, we will have to specify the package name with the class name at the time of it's usage.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     import statement   java import


Related Questions

 Is it a good practice to use Asterick(*) in import statement to load multiple packages with single import statement ?
 What does import java.util.* means in java ?
 Why do we need to specify import statement ? Don't you think Java could have been designed in such a way to automatically import everything that's in the class path ?
 Which java package is loaded by default and hence doesn't require an explicit import statement ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: