Part of polymorphism, we have method overloading is one form where methods can have same name with different parameter types. One such example would be below:- following are my method signatures – void mymethod(List<String> a, List<Integer> b); void mymethod(List<Integer> c,Continue reading… Core Java: Type Erasure
Tag: Java
java URL using relative path
I have a URL: URL url=new URL(“http://www.abc.com/aa/bb/cc/file.html”); and a relative path: String relativePath=”../file2.html”; //maybe is “/file3.html” I want to get http://www.abc.com/aa/bb/file2.html using variable url and relativePath How to do it? This is very frequent requirement you see if you are dealing with webservices development. OneContinue reading… java URL using relative path
Eclipse: resource is outof sync with the file system – permanent solution
Mysteriously got the following exception when trying to build an Eclipse project: “resource is out of sync with the file system” Although I can’t be sure, I think I may have deleted a file outside of Eclipse. To fix theContinue reading… Eclipse: resource is outof sync with the file system – permanent solution
Core Java: StringBuffer and StringBuilder
StringBuffer is used to store character strings that will be changed (String objects cannot be changed). It automatically expands as needed. Related classes: String, CharSequence. StringBuilder was added in Java 5. It is identical in all respects to StringBuffer exceptContinue reading… Core Java: StringBuffer and StringBuilder
Core Java: marker interface
A marker or tagging interface is an interphase with no methods. It can be created by ANYBODY. the purpose of these interfaces is to create a special type of Object, in such a way that you are restricting the classesContinue reading… Core Java: marker interface