UrbanPro

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Is there any disadvantage if I load a package multiple times?

Asked by Last Modified  

10 Answers

Learn Java

Follow 2
Answer

Please enter your answer

Only once complied and executed.
Comments

7+ year of corporate Experience in Manual & Automation(Java + Selenium) Testing in IT industry

No effect if you import multiple packages because import package means you are only providing path.
Comments

Java Trainer

no effect, after compiling java file it will have only one import.
Comments

Good knowledge of computer application as well as other subjects

YOUR PROGRAM GET COMPLEX AND LENGHTY.
Comments

Talent with Professional Experience

So yes it will take memory. But then we need not to worry about if we can use good editor/software like eclipse for Java programming which automatically removes the unused packages which will consume more memory
Comments

Trainer

Yes.
Comments

Software Development Trainer

Yes there is. It's like inviting a guest multiple times for the same function. Waste of time and resources.
Comments

Trainer

I does not make any difference to the compiled class (byte code) file if you import a package multiple times in a Java program. Java compiler just ignore it. Only it is an overhead to the compiler to detect it and remove it from the final compiled (byte code) file or .class file.
Comments

It will just take more memory.
Comments

JVM will internally load the class only once no matter how many times you import the same class.
Comments

View 8 more Answers

Related Questions

Is it possible to instantiate the abstract class?
Use anonymous class. Example: For an abstract class AbstrClass. AbstrClass ac = new AbstrClass() { public void m1() { // code...
Reshma
How do I show a popup message over a system tray icon/application in Java?
The java.awt.SystemTray class introduced in Java™ SE version 6 represents the system tray for a desktop. The system tray can be accessed by calling the static SystemTray.getSystemTray() method. Before...
Ajith
0 0
5
Why using Overriding in Java ?
There was a student who always pronounces "University" as "Univerkity". His teacher got angry and called the parents and asked to know the reason. Teacher got shocked as they are pronouncing "Capacity"...
Shivendra
What are the advanced Java topics?
Mainly divided in three parts JDBC,SERVLET,JSP and each one contains multiple sub topics
Ganesh
0 0
5
What is the difference between checked and unchecked exceptions?
The main difference between checked and unchecked exception is that the checked exceptions are checked at compile-time while unchecked exceptions are checked at runtime
Wren

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Implementation: What Is JPA And JPA?
The basic Java framework to access the database is JDBC. Unfortunately, with JDBC, a lot of hand work is needed to convert a database query result into Java classes. JPA allows us to work with Java classes...

Java Collection
Collection: The collection provides an architecture like a list where we can store and manipulate the group of items. Through Collections, we can achieve operations such as searching, sorting, insertion,...

JAVA OOPs Concepts (Object-Oriented Programming System)
JAVA OOPs Concepts (Object-Oriented Programming System) It is primarily having below crucial points. Without below essential points, we will never be able to achieve OOPs in java, PHP, C#, etc. Now let...

Method Overloading vs Method Overriding
1. Method Overloading: Method overloading means a same method with same name can have different implementations/body by changing one of the follwing thing: 1) Number of Parameters 2) Order of Parameters 3)...

Access Specifiers â?? Private, Protected, Public, Package-private
Access level modifiers determine whether other classes can use a particular field or invoke a particular method. The following table shows the access to members permitted by each modifier. Access...

Recommended Articles

Java is the most commonly used popular programming language for the creation of web applications and platform today. Integrated Cloud Applications and Platform Services Oracle says, “Java developers worldwide has over 9 million and runs approximately 3 billion mobile phones”.  Right from its first implication as java 1.0...

Read full article >

Designed in a flexible and user-friendly demeanor, Java is the most commonly used programming language for the creation of web applications and platform. It allows developers to “write once, run anywhere” (WORA). It is general-purpose, a high-level programming language developed by Sun Microsystem. Initially known as an...

Read full article >

In the domain of Information Technology, there is always a lot to learn and implement. However, some technologies have a relatively higher demand than the rest of the others. So here are some popular IT courses for the present and upcoming future: Cloud Computing Cloud Computing is a computing technique which is used...

Read full article >

Java is the most famous programming language till date. 20 years is a big time for any programming language to survive and gain strength. Java has been proved to be one of the most reliable programming languages for networked computers. source:techcentral.com Java was developed to pertain over the Internet. Over...

Read full article >

Looking for Java Training Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more