Can I import same package/class twice? Will the jvm load the package twice at runtime?
Answer / Bharat Kumar Rajak
No, you cannot import the same package or class twice. The JVM loads classes only once and shares them among all classes that use them. If you try to import a class twice, it is treated as an error.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is deadlock?
When a thread blocks on i/o?
Can we sent objects using Sockets?
What is the return type of interrupt method?
What must a class do to implement an interface?
Can you write Java code for declaration of multiple inheritance in Java ?
When is the best time to validate input?
What are the ways to define classes that can be run as threads?
can we write implementation for a method with in another method?
Difference between hashmap and hashtable?
What is checkpoint? How to create checkpoints in our java projects?
How is serialization used generally ?