File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes type of import statements? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "type of import statements?" Watch "type of import statements?" New topic
Author

type of import statements?

senthil sen
Ranch Hand

Joined: Oct 10, 2002
Posts: 184
1.import java.packageName
2.class extends java.packageName
3.how can package be imported as an inline statement???
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Line 2 is not a valid statement. It would need to be:
class MyClass extends java.packageName.ClassName
Import is not the same as include in C++.
Import just provides the namespaces to look in to find the classes that are not qualified. If you fully qualify all of the classes that you use scattered through your code, then you don't need to have import statements at all.
I would NOT recommend this practice. As a matter of fact many shops insist that you list every class that you are importing specifically, just to document what you are using.


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
Don't get me started about those stupid light bulbs.
 
subject: type of import statements?
 
Similar Threads
classpath issue
ODBC and xBase
Document to String
include class in other file?
WA #1.....word association