Hi,
hope all are well. Presently i faced a problem in java. I am using a java method that has a method and packaged structure same as a library the project is using.But at run time the code of the library code is executed not the code written in the class of my application.Why the library is getting priority ??? . Thanks in advance
Do you mean that in your application you have a class that has the same name as a class in a library, and it is also in a package with the same name as the package name in the library?
In principle, which one Java uses in such a situation is undefined. It might depend on the order on which things are on the classpath, but it would be a bad idea to write a program that only works correctly if the order of things on the classpath is right (that would be very brittle).
Change the package name or class name in your application.