Sunday, November 22, 2009
Sunday, November 15, 2009
hashmap
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package corejava;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.TreeSet;
import java.lang.Thread;
/**
*
* @author VijaykumarRamalingam
*/
public class hasmap {
public static void main(String args[])
{
//Hashmap vs Hashtable
//Synschrnized
//null key and null values
HashMap s=new HashMap();
s.put("1","b");
s.put(null, "5");
TreeSet sd=(TreeSet)s.keySet();
Iterator i= sd.iterator();
System.out.print(s.get(null));
Hashtable s3=new Hashtable();
s3.put(1,"b");
s3.put(1, null);
System.out.print(s3.get(1));
}
}
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package corejava;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.TreeSet;
import java.lang.Thread;
/**
*
* @author VijaykumarRamalingam
*/
public class hasmap {
public static void main(String args[])
{
//Hashmap vs Hashtable
//Synschrnized
//null key and null values
HashMap s=new HashMap();
s.put("1","b");
s.put(null, "5");
TreeSet sd=(TreeSet)s.keySet();
Iterator i= sd.iterator();
System.out.print(s.get(null));
Hashtable s3=new Hashtable();
s3.put(1,"b");
s3.put(1, null);
System.out.print(s3.get(1));
}
}
reverse
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package corejava;
public class Main {
public static void main(String[] args) {
int a[]=new int[3];
a[0]=1;
a[1]=2;
a[2]=3;
int j=a.length-1;
for(;j>-1;j--)
{
System.out.println("j"+a[j]);
}
}
}
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package corejava;
public class Main {
public static void main(String[] args) {
int a[]=new int[3];
a[0]=1;
a[1]=2;
a[2]=3;
int j=a.length-1;
for(;j>-1;j--)
{
System.out.println("j"+a[j]);
}
}
}
Saturday, November 14, 2009
UBS Interview Questions
1)oops concepts
2)Race condition
3)Deadlock'
4)critical section
5)String
6)Java access specifiers
7)final methods in object class
8)exception hierarchy
9)unchecked exception examples
10)program IO exception
11)f00()-overrriding
12)Collection interface implementation
13)methods of collection classes
2)Race condition
3)Deadlock'
4)critical section
5)String
6)Java access specifiers
7)final methods in object class
8)exception hierarchy
9)unchecked exception examples
10)program IO exception
11)f00()-overrriding
12)Collection interface implementation
13)methods of collection classes
Wednesday, November 11, 2009
Spring/Hibernate interview questions
http://www.mydeveloperconnection.com/html/spring-hibernate-QnA.htm
Monday, November 9, 2009
Inner classes
http://www.developer.com/java/other/article.php/859381/SJCP-Exam-Preparation-Top-level-and-Inner-Classes.htm
http://www.developer.com/java/ent/article.php/899361/Some-Insight-Into-Inner-Classes-in-Java-Part-1.htm
http://www.developer.com/java/ent/article.php/899361/Some-Insight-Into-Inner-Classes-in-Java-Part-1.htm
Subscribe to:
Posts (Atom)