About 249,000 results
Open links in new tab
  1. Import a custom class in Java - Stack Overflow

    Oct 23, 2011 · How do I import a class I wrote in a different file? All my classes are under the same package.

  2. What are the dangers of using a wild card with a Java import …

    An import statement is intended to import a package, not a class. It is much cleaner to import entire packages; the issues identified here (e.g. java.sql.Date vs java.util.Date) are easily …

  3. java - Import package.* vs import package.SpecificType - Stack …

    Oct 29, 2012 · Actually, I understood avoiding using import package.* as an optimization for the compiler, because it allowed the compiler to better target the class file look up when compiling …

  4. What's the difference between a package and an import?

    May 10, 2014 · 2 sentence "import java.util. " imports only the classes under the util package. You can use "import java.util.regex. " to import Matcher and Pattern classes . A package is a …

  5. java - How to use classes in other package? - Stack Overflow

    Can I import and use a class from another package? In Eclipse I made 2 packages, one is main other is second main -main (class) second -second (class) I want the main function of main …

  6. How to import a package in java? - Stack Overflow

    May 2, 2017 · import java.awt.* //pollutes global namespace and results in hard-to-trace class names I also don't want to reference the java package every time I want to use one of the awt …

  7. Change Name of Import in Java, or import two classes with the …

    Mar 10, 2015 · In Python you can do a: from a import b as c How would you do this in Java, as I have two imports that are clashing.

  8. osgi - When should I use Import-Package and when should I use …

    61 OSGi allows for dependencies to be determined via Import-Package, which just wires up a single package (exported from any bundle), and Require-Bundle, which wires up to a specific …

  9. import - Importing packages in Java - Stack Overflow

    Sep 3, 2012 · 12 In Java you can only import non-primitive types, or static methods/fields. To import types use import full.package.name.of.TypeName;

  10. How is import done in Java? - Stack Overflow

    Aug 25, 2009 · A Java package is a mechanism for organizing Java classes into namespaces similar to the modules of Modula. Java packages can be stored in compressed files called JAR …