Can I import same package/class twice? Will the JVM load the package twice at runtime?
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. Can I import same package/class twice? Will the JVM load the package twice at runtime?Core Java
Ans. One can import the same package or same class multiple times. Neither compiler nor JVM complains wil complain about it. And the JVM will internally load the class only once no matter how many times you import the same class.

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

   Like         Discuss         Correct / Improve     java   import   jvm   advanced     Asked in 1 Companies      intermediate        rare


Related Questions

  What are different ways to create String Object? Explain.
 Difference between JVM, JRE and JDK ?
  What are various types of Class loaders used by JVM ?
  Explain java.lang.OutOfMemoryError ?
  What are strong, soft, weak and phantom references in Java ?
  Which memory areas does instance and static variables use ?
  Can we call the garbage collector explicitly ?
  Why Java provides default constructor ?
  Different types of memory used by JVM ?



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: