Are there any performance advantages or disadvantages to using either?   I notice in eclipse whenever I need to import something due to a class missing, it imports only that specific class.  Understandably because that is the only class I am using at the time.  For instance, I could have package.models.  This models folder contains 8 classes that define the structure of data tables.  This may be a small example but are there any performance advantages/disadvantages between using package.models.* compared to package.models.specific_model_name?  I asked this because when I first started in my programming career I used to get slaughtered for using "select *" in my queries.  I was curious if the same holds true for the importing of classes, which I have never really heard anyone mention before throughout my career.  Edit:  Thank you for all who responded.  I unfortunately do not have enough reputation to give anyone any upvotes.  I also would more lean towards this one being a duplicate, .
14731
It is much more convenient and cleaner to use a single statement like  import java.awt.*;   than to import a bunch of individual classes  import java.awt.Panel; import java.awt.Graphics; import java.awt.Canvas; ...   What is wrong with using a wildcard in the import statement?
37849
I'm working on a project in C#. The previous programmer didn't know object oriented programming, so most of the code is in huge files (we're talking around 4-5000 lines) spread over tens and sometimes hundreds of methods, but only one class. Refactoring such a project is a huge undertaking, and so I've semi-learned to live with it for now.  Whenever a method is used in one of the code files, the class is instantiated and then the method is called on the object instance.  I'm wondering whether there are any noticeable performance penalties in doing it this way? Should I make all the methods static "for now" and, most importantly, will the application benefit from it in any way?
55036
I saw this reply from Jon on :     If you want a single collection to   contain multiple unrelated types of   values, however, you will have to use   List&lt;object&gt;   I'm not comparing ArrayList vs List&lt;&gt;, but ArrayList vs List&lt;object&gt;, as both will be exposing elements of type object. What would be the benefit of using either one in this case?  EDIT: It's no concern for type safety here, since both class is exposing object as its item. One still needs to cast from object to the desired type. I'm more interested in anything other than type safety.  EDIT: Thanks Marc Gravell and Sean for the answer. Sorry, I can only pick 1 as answer, so I'll up vote both.
86079
I recall there is a difference between some methods/properties called directly on the  class, and the identically named methods/properties on the  property. (Might have been the RowCount/Count property for which I read this.) The difference is one of them disregards , and the other respects/uses it.  In this particular case I'm wondering about the difference between  and . I can imagine one of them actually removes all rows, and the other one just marks them as deleted.  So my question is, is there a difference between the two Clear methods, and if so what is the difference?  (Oh, this is for .NET 1.1 btw, in case the semantics changed from one version to another.)
88690
I am struggling to understand how option processing works in classes. As a MWE  foo.tex:  \documentclass[draft,figures]{foo} \begin{document}   \includegraphics{example-image} \end{document}   foo.cls:  \ProvidesClass{foo} \RequirePackage{foo} \LoadClassWithOptions{article} \RequirePackage{graphicx}   foo.sty  \ProvidesPackage{foo} \RequirePackage{etoolbox} \newbool{foo@figures} \DeclareOption{figures}{\booltrue{foo@figures}} \ProcessOptions\relax \ifbool{foo@figures}{\PassOptionsToPackage{final}{graphicx}}{}   When I process foo.tex with pdflatex the log shows     LaTeX Warning: Unused global option(s):       [figures].   but I also see the graphic, which means that I am passing the final option to the graphicx package. Why does LaTeX think the figures option is unused?  Moving \LoadClassWithOptions to before the package is loaded gets rid of the warning. In my real use case, the class that is being loaded, loads the graphicx package and therefore I need to load the package before loading the class.
32230
I am writing a test class that needs to be instance-agnostic. On some of our instances we have a managed package that affects the outcome of the test, so I need to insert some test data that will be used by that managed package, but I'm worried that if I migrate this test case to instances without that managed package, it will fail when trying to insert this test data for objects that don't exist on that instance.  To make a long question shorter, is there a way to test for the presence or absence of either a specific object or a managed package so I can run this code conditionally?
79065
I'm trying to figure out which of these interfaces I need to implement. They both essentially do the same thing. When would I use one over the other?
14648
Is it possible to find all classes or interfaces in a given package? (Quickly looking at e.g. , it would seem like no.)
19431
What, if any, is the performance difference between the following two loops?  for (Object o: objectArrayList) {     o.DoSomething(); }   and   for (int i=0; i&lt;objectArrayList.size(); i++) {     objectArrayList.get(i).DoSomething(); }
22625
MyClass[] array; List&lt;MyClass&gt; list;   What are the scenarios when one is preferable over the other? And why?
36917
Why did MS originally make the decision to maintain these two separate core libs? Maybe they had some scalability issue in mind, but nowadays I never see an application, of any type, that doesn't need both. Does anyone have any inside information on this? It's not really important, but been on my mind for years.  PS. I know what's in the two libs, I know the difference - I'm a big fan of  :) Just wondering what practical use the separation of the two has.
78854
Can anyone tell me the difference between those two commands?  Edit: Thanks for the answers, but I didn't get the clue yet. Here's an example:  test.tex  \documentclass[a4paper,oneside]{mytestclass} ...   mytestclass.cls  \NeedsTeXFormat{LaTeX2e}  \ProvidesClass{testclass}[2011/01/30 v0.1 testclass] \LoadClass{book}   or  \NeedsTeXFormat{LaTeX2e}  \ProvidesClass{testclass}[2011/01/30 v0.1 testclass] \LoadClassWithOptions{book}   In both examples the options a4paper and oneside are passed to book. So, I don't see any difference in the result.
59724
One sees all kind of versions in source files for defining something like a limit etc. So my question is which one serves what purpose. Is there any "best practice" in chosing one over the other?
25247
Does anyone have experience with using a feature as a module? The usage I am talking about is strictly placing hooks inside the .module file. Can that trigger any sort of bug?
66425
I'm creating a web based system which will be used in countries from all over the world. One type of data which must be stored is dates and times.  What are the pros and cons of using the Java date and time classes compared to 3rd party libraries such as ? I guess these third party libraries exist for a good reason, but I've never really compared them myself.
22377
Some time ago, I came across a piece of code, that used some piece of standard Java functionality to locate the classes that implemented a given interface. I know the functions were hidden in some non-logical place, but they could be used for other classes as the package name implied. Back then I did not need it, so I forgot about it, but now I do, and I can't seem to find the functions again. Where can these functions be found?  Edit: I'm not looking for any IDE functions or anything, but rather something that can be executed within the Java application.
49637
I came from Java, and now I am working more with Ruby.   One language feature I am not familiar with is the module. I am wondering what exactly is a module and when do you use one, and why use a module over a class?