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

Execution process of java bytecode, Execution Process of Java bytecode ...

Execution Process of Java bytecode JVM are available for almost every operating system. Java bytecode is executed by employing any operating system's JVM. Hence achieve port

Web-based client program, Why are JSP pages the preferred API for creating ...

Why are JSP pages the preferred API for creating a web-based client program? Because no plug-ins or security policy files are required on the client systems (applet does). Also,

Pseudocode, Create an application for an animal-fur trimming service. The b...

Create an application for an animal-fur trimming service. The business is open 15 weeks of the year, from April through July. The fee for a small animal (under 6 pounds) is $100, a

Concurrent Programming, Problem 1 A savings account object holds a non-nega...

Problem 1 A savings account object holds a non-negative balance, and provides deposit(k ) and withdraw(k ) methods, where deposit(k ) adds k to the balance, and withdraw(k ) subtra

For what purposes ftp is used in networks, For what purposes FTP is used in...

For what purposes FTP is used in networks? FTP is known as file transfer protocol it is basically used to download or upload files / data to a remote computer.

Jsf framework compare with the struts framework, Struts framework ...

Struts framework                            J a v a Server Faces More matured since Struts has been started for a few years. It has got var

Kik messenger program, Kik Messenger is a plan mobile messenger like Skype....

Kik Messenger is a plan mobile messenger like Skype. It's available on each major smart phone for Android and Iphone. Here is the entire process: Could be able to add multipl

Help, Are you real? I dont want to get help from a computer

Are you real? I dont want to get help from a computer

What is an immutable object, What is an immutable object? An immutable ...

What is an immutable object? An immutable object is one that we can't change once it's created. Steps involved in creation of an immutable object are: Make all of its data f

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