Interview Questions

SONATA:      18th Jan 2014
  1. Write a for loop using java1.5 version.
  2. What is generics? Give an example.
  3. How can you eliminate duplicate id's where employee list contains duplicate id's and sort by employee name.
  4. Why should override hashcode() method?
  5. What is the difference between concatination method and adding elements to the existed object like      Sting s="a";                                                                                                                                     String s="a"+"b"+"c";
  6.                map.put("a",a);                                                                                                                                map.put("b",c);                                                                                                                                map.put("a",b);  it will works or not?

IBS  25th Jan 2014
  1. Create10 Employee objects using HashMap interface and that Employee object should contain   Name, Age, Joblevel, Experience.

IGATE :     25th Jan 2014
  1. What are oops Principles
  2. Write custom Exception with an example
  3. Write a query to retrieve 2nd highest salary employee from employee table
  4. Where shall we get SESSION object? how it will be created?
  5. How can we rollback a transaction either any one of the condition fails in the HIBERANTE
  6. On which basis can we know that the defined exceptions comes under either CHECKED or UNCHECKED exceptions
  7. What will be the output of the below program.
        class A
      {
            public void show()
       }
        class B extends A
      {
            public void show()
       }
      public class inheritence
      {
            public static void main(String[] a)
            {
                   A a=new B();
                      a.show();
                   A a=new A();                 
                     a.show();
                  B b=new B();                   
                        b.show();
               }
       }


1 comment:

  1. Hey I just finished reading your blog and I think it's great. I've been looking for some tips on Java interview questions and star interview questions and answers since the last week and I was really getting frustrated at not finding some useful tips.

    ReplyDelete