Name conflicts when importing packages, JAVA Programming

Assignment Help:

Name Conflicts when importing packages

It is possible which you will try to import a package which contains classes in which have the similar name as a class in your own source code. In common you should try to prevent this, especially while the conflict is with a class in the java packages.

The two classes may or may not mean the similar thing. In common you should probably rename the class in your own source code rather than in the package. Therefore if the two classes with conflicting names are associated functionally, it might make sense to implement your class as a subclass of the class in the package.

There are a couple of name conflicts in the class library. The worst offenders are java.util.List and java.awt.List. The second worst offenders are java.sql.Date and java.util.Date, by this case is somewhat mitigated because java.sql.Date is a subclass of java.util.Date. If you requires to use one or both of the conflictingly named classes as well as importing the other package, you simply have to use the full package qualified name, inconvenient as it may be to categories.


Related Discussions:- Name conflicts when importing packages

Information retrieval during multi-agent system, Information Retrieval duri...

Information Retrieval during Multi-Agent System with Data Mining in Cloud Computing Project Description: I have proposed one research model on "Information Retrieval during M

What is javaserver faces expression language, A easy expression language us...

A easy expression language used by a JavaServer Faces UI component tag attributes to bind the associated component to a bean property or to bind the associated component's value to

Difference between boolean & operator and && operator, How can we define th...

How can we define the difference between the Boolean & operator and the && operator ?

Create a usercontrol called loginpasswordusercontrol, (Login User Control) ...

(Login User Control) Create a UserControl called LoginPasswordUserControl that contains a Label (loginLabel) that displays string "Login:", a TextBox (loginTextBox), where the user

What is a local member and a class variable, What is a local, member and a ...

What is a local, member and a class variable? Variables declared within a method are "local" variables. Variables declared within the class i.e not within any methods are "m

What is an abstract class, What is an abstract class? Abstract class mu...

What is an abstract class? Abstract class must be extended/subclassed (to be useful). It serves as a template. A class that is abstract may not be instantiated (ie. you may not

Neatbeens and glass fish, Assignment 3 Project Proposal Documentation Descr...

Assignment 3 Project Proposal Documentation Description Marks out of Wtg(%) Due date Assignment 3 100 35% 15/09/14 In the assignment we will start analysing and designing the

What is alternate text, What is Alternate Text ? The APPLET element ca...

What is Alternate Text ? The APPLET element can have an ALT attribute. An ALT attribute is used through a browser which understands the APPLET tag but for some purpose cannot

Create a simple object based gui application, Objective: create a simple o...

Objective: create a simple object, put that object in a simple collection class, use that object and collection in a simple GUI application. Specification:  Consider a Librar

Method overriding, how to write java programe and example programe

how to write java programe and example programe

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd