Archive for March, 2012

Collections in Java

Array List Vs Vector:
Common:
DataStructure:Array
Resize Capacity:
ArrayList – increase by half
Vector -increase double

Difference:-

ArrayList are asynchronous. It is possible to synchronized by using collection class

ArrayList arrayListObj =new ArrayList<>();
Collections.synchronized(arrayListObj)

Vector are synchronized.

Advertisements

, , , ,

Leave a comment

JaVa Cloneable

Upcoming post …

Leave a comment

NoSuchProviderException

NoSuchProviderException:

This Exception is occured due to the following reason

If there is two different version of the provider (email, ftp,tftp,so on) in your application. then conflict occurs .Application  tries to get the provider, it is also available by due to the two different version ,Conflict occurs which throws   NoSuchProviderException()

Ex: Provider – Email  (For Ex:-)

javax.mail-1.4.3

activation-1.x.jar

mail-1.3.2.jar

In your application if you have any of these above 2 or all then the NoSuchProviderException() occurs….

 

 

Leave a comment

Convert List[T] to T[]

Syntax: 

<T> to T

List<T> list = new ArrayList<T>();
T [] countries = list.toArray(new T[list.size()]);
 T  to List<T>
T[] countries = {"India", "Switzerland", "Italy", "France"};
List<T> list = new Arrays(Arrays.asList(countries));
T – int, String, double (any primitive type)

Create a List of Element:

List<String> list  = new ArrayList<String>();

list.add(“INDIA”);     list.add(“JAPAN”);   list.add(“PAKISTHAN”);

Convert List to String of array ie) String[]  :

String[] listToString = list.toArray(new String(list.size());

Reference:

http://viralpatel.net/blogs/2009/06/convert-arraylist-to-arrays-in-java.html

Leave a comment

Hibernate Tutorial Best Link

Hibernate:

http://viralpatel.net/blogs/2011/11/introduction-to-hibernate-framework-architecture.html

http://docs.jboss.org/hibernate/core/4.1/javadocs/

 

For JPA:

http://download.oracle.com/otndocs/jcp/persistence-2.0-fr-eval-oth-JSpec/

http://www.objectdb.com/api/java/jpa

http://docs.oracle.com/javaee/6/api/javax/persistence/package-summary.html

,

1 Comment

My-SQL Reference

http://www.pantz.org/software/mysql/mysqlcommands.html

http://blog.sqlauthority.com/2009/04/13/sql-server-introduction-to-joins-basic-of-joins/

http://zetcode.com/databases/mysqljavatutorial/

Leave a comment

30 Useful Eclipse Plugin

I found the useful eclipse plugin in a site, so here  i posted the link

http://www.ajaxline.com/best-eclipse-plugins

For Bravo JSP Eclipse Plugin link:

http://bravo.comxa.com/install.php

For Soap UI eclipse plugin

http://www.soapui.org/IDE-Plugins/eclipse-plugin.html

For Amateras plugin for Eclipse:

http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=AmaterasUML

Leave a comment