Can I import same package/class twice?



Can I import same package/class twice?..

Answer / Manju Lata

You cannot import the same class or package multiple times in the same Java file, but you can import different names from the same package to avoid naming conflicts.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is overloading and overriding in java?

1 Answers  


Why are pointers not secure?

1 Answers  


Can sleep() method causes another thread to sleep?

1 Answers  


Explain how hashmap works?

1 Answers  


What is a default method?

1 Answers  


Does sprintf allocate memory?

1 Answers  


What are strings in physics?

1 Answers  


Explain the role played by Java Virtual Machine in Java Programming?

1 Answers  


Is call by reference possible in java?

1 Answers  


Why we do exception handling in java and how many types of exceptions are there?

1 Answers  


Which is the class in java?

1 Answers  


What is the difference between && and & in java?

1 Answers  


Categories