Core Java - Interview Questions and Answers for 'Import packages' | Search Interview Question - javasearch.buggybread.com
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

   



Core Java - Interview Questions and Answers for 'Import packages' - 2 question(s) found - Order By Newest

 Q1. Is it a good practice to use Asterick(*) in import statement to load multiple packages with single import statement ?Core Java
Ans. No, we should be lean in loading only packages which are required. Loading packages which are not being used result in memory overheads.

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

   Like         Discuss         Correct / Improve     import  import packages     Asked in 1 Companies


Related Questions

  What are concepts introduced with Java 5 ?
  Can I import same package/class twice? Will the JVM load the package twice at runtime?
  What is "Import" used for ?
  What is a Static import ?
  Which of the following syntax is correct ?import static java.lang.System.*;or static import java.lang.System.*;
 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 ?
  Do we need to import java.lang package ?
 Does importing a package imports all its sub packages too ?
 Why is it important to close files and streams ?


 Q2. Does importing a package imports all its sub packages too ?Core Java
Ans. No, but we can use wild card (*) to do so

For example -

import java.util.*

will import all packages with name starting with java.util

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

   Like         Discuss         Correct / Improve     package   import packages     Asked in 1 Companies      basic


Related Questions

  What are concepts introduced with Java 5 ?
  Can I import same package/class twice? Will the JVM load the package twice at runtime?
  What is "Import" used for ?
  What is a Static import ?
  Which of the following syntax is correct ?import static java.lang.System.*;or static import java.lang.System.*;
 Is it a good practice to use Asterick(*) in import statement to load multiple packages with single import statement ?
 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 ?
  Do we need to import java.lang package ?
 Why is it important to close files and streams ?


 Q3. Which of the following wildcard is used to import multiple packages at once ?Core Java
a. .
b. ?
c. *
d. &

Ans.c. *


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: