import me.prettyprint.cassandra.serializers.ObjectSerializer;
import me.prettyprint.cassandra.serializers.ObjectSerializer;
mvn dependency:resolve -Dclassifier=sourcesmvn dependency:resolve -Dclassifier=javadocAn interesting aspect about final Collection that many java developers may not be familiar with is that making a collection final means only the reference cannot be changed but you can add, remove or change an object inside collection.
Example:
private final List<String> names = new ArrayList<String>();
names.add("Name1"); //Allowed
names.add("Name2"); //Allowed
names = new ArrayList<String>(); //Error
vi /etc/yum.repos.d/iso.repoPlace following text in iso.repo [iso] name=My ISO Repo baseurl=file:///mnt/iso
enabled=1 gpgcheck=0 Print ClassNotFoundException
A simple problem that I have found many people struggling with – how to print class-path. Following is the line that can be used to print classpath.
Arrays.toString((((URLClassLoader) Test.class.getClassLoader().getURLs()));
This code returns an array list of all jars and directories on the classpath of the classloader.
- Sarang Anajwala