Results 1 to 7 of 7
- 11-11-2009, 06:14 PM #1
Member
- Join Date
- Nov 2009
- Posts
- 4
- Rep Power
- 0
Bginners issue i think rgarding Import
HI ,
I want to use a different classes with the same name in a different packages.
Example :
first package name is aaa.bbb.ccc.ddd and the class name is eee.
second package name is aaa.ccc.ddd and the class name is eee.
it looks like that:
import aaa.bbb.ccc.ddd.eee
import aaa.ccc.ddd.eee
sometimes i want to use the first class and sometimes i want to use the second one. is it possible ???? :confused::(:confused:
i am getting crazy....
Note :I cannot change the package*or class names.
-
Skip the imports -- delete them -- and just use fully qualified class names when referring either class.
- 11-11-2009, 06:17 PM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,427
- Blog Entries
- 7
- Rep Power
- 17
You have to use the fully qualified name for those classes, i.e. you can't import both classes but have to use the package.package.YourClass notation.
kind regards,
Jos
- 11-11-2009, 07:42 PM #4
Member
- Join Date
- Nov 2009
- Posts
- 4
- Rep Power
- 0
Thanks for the answer.
did you mean some like that :
first class use:
aaa.bbb.ccc.ddd.eee test1 = new aaa.bbb.ccc.ddd.eee();
second class use:
aaa.ccc.ddd.eee test2= new aaa.bbb.ccc.eee();
is it correct ?
- 11-11-2009, 07:50 PM #5
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,427
- Blog Entries
- 7
- Rep Power
- 17
- 11-11-2009, 08:00 PM #6
Member
- Join Date
- Nov 2009
- Posts
- 4
- Rep Power
- 0
Thanks guys i will try it tommorow and let you know if it fixed my problem ...
Thanks allot :-)..
- 11-13-2009, 03:18 PM #7
Member
- Join Date
- Nov 2009
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
Eclipse 3.5<import *.jar -Need help>
By roughjj in forum EclipseReplies: 1Last Post: 09-09-2009, 09:24 AM -
Import / Export Issue
By Gideonzx in forum EclipseReplies: 0Last Post: 07-23-2009, 08:08 PM -
How could i import DLL in NetBeans?
By makpandian in forum NetBeansReplies: 0Last Post: 02-13-2009, 12:53 PM -
can any one help?? how to import library
By libish in forum New To JavaReplies: 5Last Post: 02-12-2009, 06:51 AM -
import statement.
By diRisig in forum New To JavaReplies: 2Last Post: 02-08-2008, 12:34 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks