The Artima Developer Community
Sponsored Link

Java Answers Forum
Is java.util.List faster than java.util.*

1 reply on 1 page. Most recent reply: Mar 29, 2010 1:31 AM by Kondwani Mkandawire

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Ajay Kamble

Posts: 1
Nickname: akamble
Registered: Mar, 2010

Is java.util.List faster than java.util.* Posted: Mar 25, 2010 12:12 AM
Reply to this message Reply
Advertisement
Hello,

Is it true that java.util.List (importing a specific class) will make a program faster than java.util.*, or is this just a myth?

I know that import is just a way to say which List we want to use [java.util.List or com.abc.List] and we are not actually loading anything in JVM.

It would be great if I can get answer of above question and details about how JVM processes import statements or perhaps some resource which explains this.

Will JVM maintain a table in memory containing all types that are imported [or available to load]?

Regards,
Ajay


Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: Is java.util.List faster than java.util.* Posted: Mar 29, 2010 1:31 AM
Reply to this message Reply
AFAIK, import is a compile-time Concept and not a runtime concept. Import will tell your compiler which List you are referring to for instance, meaning it won't make one bit of a difference at runtime. JavaC concept and not a JVM (runtime) concept.

Flat View: This topic has 1 reply on 1 page
Topic: RAM size, CD/DVD Previous Topic   Next Topic Topic: large file in a given folder

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use