1.
L & T infotech telephonic
1.oops concept
2.what dynamic dispatch and static calling in polymerphism
3.Different types of exceptionas
2.CitiusTech
1.Briefly specify your role company
2.Oops concept
3.write code to create singleton class.
4.multiple inheritance possible in java? if yes how ?
5.is it possible to extend class by both abstract class and interfac
6.Tool to check java coding standard ?
7.multithreading questions?
8.below program o/p:
class A{
private int calc(int x,int y);
class B extends A{
public int calc(int x,int y)
}
public class Operation{
psvm(main){
class A=new A();
A.calc();
class B=new B();
B.calc();
class B=new A();
B.calc();
class A=new B();
A.calc();
}
a.is above program compile?
b.can we calc() from child class?
3.infosys
1.oops concept ? real life example
2.final keyword use?real life example for why not override final method?
3.method overriding?
4.SDLC life cycle use?
5.
4.accenture
1.what is interface
2.differences between statement and preparedstament
3.what is method overriding
4.whats is immutable class
5.about current projects
6.what is serialization
7.how to sort arraylist elements
8.how to sort elements employee in arraylist based on age employee.
9.max sal query
10.program to create singleton class
11.program to get unique record using collection
12.string pool logical program
5.delloite
1.what is diff between procedural oriented language and object oriented lnaguage
2.oops concept explain
3.diff between abstraction and encapsulation
4.abstaction and abstract class is same
5.diff between abstraction and interface
6.whats is muliple inhetance in java
7.can muliple inheritan e possible in java using abstract class
8.what is o/p of below code
interface a{
int i=10}
interface b{
int i=5}
class c a,b{
sop(i)
}
o/p:?
9.write code for jdbc connection in java
10.how Hashmap internally work
11.write code to retrieve elements from hashtable
12.diff between vector and arraylist
13.what is synchronization
14.what ibm websphere?is it application server or web server?why you use it?
15.diff between application server and web server
16.what is o/p of below code
class a{
int i=10}
class b{
int i=5}
class c extends a,b{
sop(i)
}
o/p:?
6.golden source
1.collection heirachy
2.oops concepts
3.how hashmap work
4.how thread implement
5.diff between overloading and overriding
6.exception handling hierarchy
7.differences between collection and collections.
8.steps to create jdbc comnection
9.alternative way create connection.
10.use of synchronization keyword in method and block
11.example
getmethod(){
try{
return true;
}
finally{
return false;
}
}
main()
{ sop(getmethod())}
7.rolta
8.Bank of america
1.diffence between overloading and overriding
2.steps to connect database
3.difference between throw and throws
4.sample program on finally block,throw throws
9.TIAA
10.Accelys kale
* written test on logical, reasoning and on java
*interview:
* inheritance
* exception handling
* xml parsings
*
11.IDFC
1. inheritance
2. what is multi threading in java ? how to avoid deadlock ? keep thread running continuously
with sleep
3.transient varible
4.how hashmap work? can i store duplicate elements with duplicate keys? equls method in
hashmap ? iterate hashmap
5.differnce between Delete, truncate and drop
6.what is view?can we update view?
7.can one table have two separate primary keys
8.oops principle? difference abstraction and encapsulation
9.pelican ofac architecture
10.difference primery key and foreign key
11.what is SDLC ? which model use in development ?
12.difference between procedure and function
13.whar if private static void main ?
14. constructor chaining in inheritance
15.what is s in HTTPS ?
12.aow Hewitt
1. online written test of reasoning, grammer
13.l & t
1.oops concept with real life example
2.how defination for integer key and string name in hashmap ? defination if key is a object
3.iterate hashmap
4. how to create singleton class ? what are singleton class in java ? singleton in case of
multi-threading scenario
5.what is serialization ? not want to serialize any variable or object ?
6.whats is immutable class ? immutable class of java
7.differnce between arraylist and vector ?
14.Nomura
1.Difference between Encapsualtion and Abstraction ?
2.Difference between wait() and sleep() ?
3.Why 'suspend' deprecate in java ? is it silmilar to wait() ?
4.what is the output of below program:
public class OrderOfCons {
class B
{
B(int i)
{ System.out.println("Parameterized Constructor of B"); }
}
class C extends B
{
public void print(int i)
{
System.out.println("Parameterized Constructor of C");
}
}
public static void main(String[] args) {
new OrderOfCons().new C(5);
}
}
Ans:
public class OrderOfCons {
class B
{
B(int i)
{ System.out.println("Parameterized Constructor of B"); }
}
class C extends B
{
public C(int i)
{
super(i);
}
public void print(int i)
{
System.out.println("Parameterized Constructor of C");
}
}
public static void main(String[] args) {
new OrderOfCons().new C(5);
}
}
5.what is the output of below program:
class B
{
private Object print(int i)
{
System.out.println("Parameterized Constructor of C");
}
}
class C extends B
{
public Integer print(int i)
{
System.out.println("Parameterized Constructor of C");
}
}
public static void main(String[] args) {
new OrderOfCons().new C(5);
}
6.Constructer chaining in case of inheritance ? is below code correct
class B
{
private Object print(int i) throw Exception
{
System.out.println("Parameterized Constructor of C");
}
}
class C extends B
{
public Integer print(int i) throw SQLException
{
System.out.println("Parameterized Constructor of C");
}
}
public static void main(String[] args) {
new OrderOfCons().new C(5);
}
7.what is serialization? differnce between serialization and externaliztion ? what is transient
variable ?
8.what is semaphore ?
9.what is best way to load below one student table and it have many courses in cache ? so to
fectch student and it cource optimal way
Stundent--> many cources
10.write code to search occurence of number in array ?
15.Genpat
1.Executors framework
2.how create immutable class in java
3.Diffrece betwenn callable and runnable interaface
4.Query to Highest Salary in each department
Ans:SELECT DeptID, MAX(Salary) FROM EmpDetails GROUP BY DeptID
5.How hashmap work internally
6.Collection use if want maintain insertion order
7.difference between wait() and sleep()
8.how to remove singleton design pattern
16.capgemini- nomura
1.design pattern ? how to create singleton design pattern?
2. thread safe class in java ?
3.how to decide by looking custom exception that it is checked or unchecked ?
4.what is enum in java ? difference between static final string and enum
5.what is jndi ?
6.what is project architecture ?how use multi-threading in it ?
7.why use MQ
8.how to find duplicate object in hashmap ?
9.difference between overloading ane overriding ?
round 2 and 3
1.how to class thread safe in java.?
2.how to return run type in java ?
3.threasafe without use of synchronization.?
4.threasafe classes in java
5.main must be executed after run im any case
17.Vakrangee
Round 1
1.difference between compiler and interprer ?
2.how you use multi-threading in project ?
3.collection heierachy
3.difference between arraylist and Vector ?
4.top class in exception ?
5. theread life cycle
6.difference between sleep() and wait() ? where we use wait() and sleep() ?
7.what are type of design pattern ? write singleton class program ? why we use singletonton
pattern ?
Round 2
1.which project your are working ?
2.SDLC life cycle ?
3.how product work ?
4.what is you current role in company?
5.what is processed in your company
6.what type of document you prepare ?
7.why you want leave current company ?
8.whom you report ?
9.what kind of work you do ?
Round 3
write soap web service to encrypt file and send it's content in response?
Round 4-HR
1.what is you salary expectation ?
2.why you want join this company ?
3.why your leaving your current company ?
4.are you able to join within 30 days ?
18.capgemini-telephonic
1.how to create immutable class in java ? what are the immutable class of java
2.how to implement consumer to access web service from wsdl
3.class A{
synchronized static void m1(){}
}
thread P1,P2
can both thread access m1 at same time.
4.query highest sal from emp table
5.query second highest sal from emp table
6.current project's
7.why you want leave this company
19.capgemini telephonic
1.singnificance of object class in java?why it is parents of all objects ? what is default method
object class ?
2.where to you use interface ? what is difference between interface and abstract class ?
requirements to create interfaces
3.what type of collection use in your project ? difference between hashmap and hashtable ?
difference between hashtable and arraylist ? difference between arraylist and Vector ? why
Vector faster than arraylist
4.way to implement thread in java ? hiw to implement thread with runnable.?
5.what is yeild ? differenc between wait and yeild()
6. what is join in thread ? write code
7. why you use web service ? how to client consume Web service ? security use in web service
8.how many design pattern ? write code for singleton design pattern ?
20.hexware
1.differnce between concencretewsdl and abstract wsdl ? what is endpoint , bindings
2.what is oops concepts ?
3.what is cohesion, aggregation ?
4.diffence between uinon and join in oracle ?
5.best design pattern ? practical senario to use ? singletonton pattern ?
6 query to join two tables ?
7.what is use of group by in oracle ?
21.capgemini:
1.sort employees object by salary of employees
2.sort in such way repated numbers go at end in sorted format
i/p:1,2,3,3,1,1,2,4
o/p:1,2,3,4,1,2,3,1,3
3.write program to find second duplicate from the list
4. how to implement thread in java ? what happened if we called run directly
5.differnce between start() and run () method ?
6.what is deadlock ? how to avoid deadlock ?
7.what use of volatile varible ? what if varible it is not volatile is both thread get same value
?where volatile store in java?
8.why wait, notify () in object class Even it is used thread class ?
9.find manger from employees table
round 2
1.what is yout profile
2how oops concepts implement in your project
3.reason of leaving
4.how you implement SOAP web service
5.what database on you working
22.propellum Infotech
1.write program to sort elements in arraylist
2.difference between arraylist and array? how internally arraylist works
3. how hashmap work internally ? is possible two keys have same hashcode for two key(has
collision)?how to avoid it
4.return works in case of exception and finally
5.challenges you face you in development
6.multiple interhence why not allowed in java? is java internally use multiple inheritance? if yes
then why it is not allowed outside
7.differnce between wait and sleep ? use of join
8.What use of final variable how to assgn value to final variables
9.what use of static block? how to call it?
10.scenario to use static varible in project ?
11. difference between static,class, and global variables
12.what is properties in collection ? what is difference between properties and hashtable ?
13.changes done in exception handling in JRE 7
14.different way to create boject in java
15.how to stop thread
23.Rolta
Round 1 core java aptitude and below test program
1.program in given matrix replace all 0's surrounded by 1 with X
ans:
http://www.geeksforgeeks.org/given-matrix-o-x-replace-o-x-surrounded-x/
Round 2
1.string pool ? why only string is immutable ?
2.design pattern you know ? write program singleton pattern.
3.which of the collection maintain insertion order
4.which of the collection maintain sorted order
5.when to use arraylist / linked list ? how linked list internally implemented ?
6.what are the equals or hashcode method.
7.write code to sort person object by its id ? difference between comparable and comparator ?
8.is hashset store duplicate ?
9.write any sorting algorithm?
10.what if join() called in main ? how it work internally ?
11.what is use of wait,notify and notifyAll ? how it works
12.what code to serialization ? write acode to serialization ?
13.what is transient variables ?
14.what is volatile/static variables ?
2.Round 3
1.tell me something about your project ?
2.string pool
3.design pattern you know ? write program singleton pattern.
4. write code of fixed thread pool ?
5.what is boxing and autoboxing
6. can we store Interger to int
7.what is generics ? write code of generic collection ?
8.exeption heirarchy
9. how gc works internally
Round 4
1.what is your role in your company ?
24.Thomas cook
mcq test of java and English paragraph test
25.capgemini
Round 1
1.oops concept
2.what is abstration ? different way to achieve abstraction
3.difference between abstraction and inheritance
4.why string is immutable ? how to create immutable class
5.write code of serialization object ? What if object state change after serialization ? will after
deserialization get the state back ? write code serialized ?
6.how internally hashmap work ?
7.what equals and hash code contract ?
8.write code of comparable and comaprator ?
9. difference between comparable and comaprator ?
10.way to implement thread ? what better way and why ?
10. how to call two method of same class by two thread at same time ?
12.singleton class
13. different way to create object in java
14. what is type of exception ?
15. can we thow null pointer exception
16. finally execution ?
17.concorrent hashmap ?
18. what is marker interface
Round 3 nomura
1.what are the strong design principles in java
2.when should we prefer interface or when should prefer abstract class
3.when should use extends threads
4. how throw exception run() method of thread to outside run?
5.how to remove duplicate words from file
6.how to excute 3 threads serial way one after another
7.how to allow to execute all threads to execute some method at same time ?
8.what is lazy loading ?
9.find missing number between 1 to 100 in arraylist
26.TIAA
1.difference between arraylist and Vector ? why arraylist are faster ?
2.how to store object in treeset in ascending order ?
3.string pool ?
4.difference between abstract class and interface ?
5.program to reverse string without using collection ?
6.method overriding related programs. ?
7.interface related programs ?
27.Tech M
1.what is inheritance ?
2.what is covariant return type ?
3.can we write both extends and implements runnable in method signature ?
4.what different between arraylist and linked list
5.difference between list and set ?
6.how to remove duplicate from arraylist ?
7.way to create object in java
8.which design pattern you use ? singleton design pattern
9.what is anonymous class ?
10.what is inner class ?
11.what are the methods of object class ?
12.what is join in oracle ?
13.what is inner query ?
14. remove duplicate from arraylist
15. what is WADL ?
16. Difference Soap and Rest web service
17.what is composition and aggregation
18. can we able to create marker interface
Round 2
1.abou project
Round 3
salary discussion
28.virtusa Polaris telephonic
1.anonymus class
2.remove duplicate from arraylist without using collection
3. second highest salary
4.how to create custom exception
5.what is the top class of exception and types of exception ? can we create custom
checked/unchecked exception ? what it contains
6.second highest salary
7. join in oracle
8. java 8 features
9. overloading vs overriding ? exception heirarchy in case overriding ? Access specifier in case
of overriding
10.difference between union and union all
29.sun pharma
1.java mars rover movment program
2.string pool ? Is string pool memory efficient as it need search entire string pool check that
string already exists or not ?
3. difference between hashmap and hashtable ? why hashtable not allowed and hashmap
allowed null value ?
create you own hashmap in java ?
4. write actual code inside hashmap ?
5 difference between arraylist and linkelist ? who is efficient in insert and delete operations ?
why efficient in it ?
6.what is space,time complexity of hashmap
7.where you use linked lust ? what application in Windows use linke List
ans:video player
30.Datamatics
31.proepellum done previously
32. Morgan Stanley
1.Round 1
written rest and below
1.swap number if different is 1 and if it is sorte print YES and write time and its space complexity
2.search number in rotatinal array 3 effeciently
time write time and its space complexity
3.query to find records present in table A but not in table B
33.Majesco
Round 1: logical and reasoning test
34.Virtusa Polaris nomura
Round 1(virtusa Polaris)
1.Brief me about your position roles, responsibility and technology used
2.difference between implements runnable and extends thread ? which one in better and why ?
3.what is future thread
4.what is countdown latch?
5.what is difference between list and set
6.which collection if want store ordered and unique
7.what needs to implements to store object in treeset in sorted order?
8.what is atomic variables?
9 what is static method working in case of synchronisation ?
Round 2 (nomura)
1.what are methods of object class ?
1.what is need of hashcode() if equal compare the object ?
2.write producer and consumer code ? write code with arraylist?
3.what is volatile ? where we can use it ?
4.what serialization ? cab we create our own custom serialization ?
5.what is new in hashmap for java 8.
Round 3
1.what is future thread?
2.difference arraylist and linked list ? which one faster ? why ? what happened if arraylist limit
exceeded ?.
3.how hashmap works internally ?
35.Morgan Stanley telephonic
1. what's happened if we override hashcode mehtod in class which return same value and stote
duplicate object ? will i get old object or replace duplicate object ?
2. different between hashmap and concurrent hashamap ? which on is faster ?
3.difference between stringbuilder and stringbuffer ?
4.what immutable class ?
5.singinificance of final keyword in class, variables and method
6.what efficient way to sort 100mb data with 10mb ram
7.how hashamap work internally
8.overaloding logical programs like which method called in case of pass null in argument to
method name but
i.if parameters is object, exception and arithmeticException
ii.if parameters is object,string and integer
9.differece between checked and unchecked exception ?why checked exception need to handle
at compile time if error occurs at run time
10. what happens if exception occurred in one thread ? is other thread continue its working
36.Genpact
1.what is normalization in Oracle
2.how hashmap internally works ? what is load factor
3.how hashset internally work's ?what changes to be do if need store duplicate in hashset
4.data structure to find tallest building in city ?
5.write logic to find if number of stating and ending are same
6.best and worst to implement hashcode method
7.what is hash collision?
37. Morgan Stanley telephonic
1.what is diamond problem ? how to avoid it ?
2.when to use interference and when to use abstract class ?
3.why java introduce new collection like hashmap, arraylist in java if collection like Vector and
hashtable arraylist already exists ?
4.how hashmap internally works ?
5.how to find missing number in 1 lac elements of arraylist with less time complexity ?
6.difference between volatile and transient keyword ?
7. find 3rd highest salary from employees table ?
8.what is view in oracle ? can we insert in view ? what is materialize view ?
9.what is cohesion, aggregation, composition, association ? difference between aggregation and
composition
38.Gupshup technologies
1.initializing x only if it not 10 in multithreading environment
public class xyz{
private Integer x;
public Integer getX(){
return x;}
public void setX(Integer newValue){
2.executor Framework use in project
3.increment counter in multithreaded program
4. Adding null + 1
5. can give null pointer execeptio if pass null in below function
public class xyz{
public void increment(Integer X){
++X;
}
6.can give null pointer execeptio if pass null in below function
public class xyz{
public void increment(Integer X){
Integer y=X+1;
}
7.multithrede class used in project
8.thread safe Integer
ans: atomic Integer
9.synchronized vs volatile
10.shared counter among multiple thread
11.diffrence between hashmap & con current hashmap other than multithreading
Round 2
1.what is transaction ? where you use it in your project ?
2.Internal working of hashmap ? what if override hascode which return same value ? best way
to write hashcode method
3.what is inner join in java ? what is outer join ?
4.write code for queue in data structures ?
5.when to use abstract class and when use interface
6.why abstract class contains non abstract methods ?
7.how treeset is sorted ? can we need to make class before store into to not to modified
8.what atomicity, consistency in ACID properties ?
9.how to implement SOAP web service ?
39.Capgemini telephonic
1. what is static keywords in java
2. what is static block
3.difference between abstract class and interface
4.way to implement threads in java
5.way to implement SOAP web service
6.what is way call procedure in jdbc
7.what is marker interface
8.what is Has-a relationship
9. access modifiers in java
10.SDLC model use in your company
11.how to implement SOAP web service
40.CitiusTech
1. Architecture of you Product
2. difference between soap and rest
3. what if we remove public from psvm()?is it compile ? change public to private/protected
4.can we overload psvm() ?
5.progrma to find first non repetative character in string ?
6 soap vs rest web service ? why you prefer soap over rest in your project
41.MSCI
1.whic collection you use ?which one is faster arraylist or hashmap ? whose performance is
best in case getting object from it ?
2.is need to override equals/hascode to retrieve retrieve object from arraylist
3. what is preferred if not want use Vector
4.remove duplicate records from large in less ram
5.can abstract class have constructer ? if yes then why we caln not create its object abstract
class?
6.depaetment wise employees count ?
7.difference between primary key amd unique key ?
8.ia object store in treeset is sorted ?
9.difference between comapable and comaprator ?
10.alternate for vector?
11.design pattern for below and also draw class diagram
car
________l________
l l l
ford hundai maruti
get above object if user pass above in string
12.design pattern if their is thousands object
13.how to create custom exception? can we alble catch null pointer in custom exception ? can
we catch null pointer exception
42.congnizant
1.project architecture
2.difference between array and arraylist
3.intern working of hashmap and hashset
4.program to count character 'O' in string
5.comaprable vs comparator
6.how concurrent hashmap work ? is this has any performance of imapct
7. fail fast vs fail safe
8. what is load factor ?
9.what is serialization and deserialization ?what to if you not want serialed any variable ? can
static varible serialized ?
10.package name use in file handling ?
11.unique ky vs primary key ? what cluster index ? can we create unique key on two tables
12 query for employees who has manager
13.what sub-query ? types of sub-query
14. can we create unique key on two columns ?
15. anonymous class
16.how to call inner class
17.quey to employee who has manager ?
18.default capacity of arraylist and hashmap
19.what is shallow copy ?
Round 2
1.use of static keywords
2.internal working of hashmap and hashset
3.which collection maintain unique Elements
4.difference between iterator and list iterator
5. encapsulation vs abstraction
6. way to implement thread
7. what are conditional operators in java
8.steps to create web service
43. J.P. Morgan
1.difference between abstract class and interface
2.can we call call() of callble statement using threads start() method
3.if modified person object stored in hashmap can we retrieve it ? cam we retrieved it ?
4.interface a{
m1()
m2()
}
class b implements a{
A a=new b()
a.m1()
}
it is possible class b on implement one method of interface ?
5.is below code executed successfully
while(true){
Object a=new B();
}
how to run run garbage collection explicitly ?what needs to get outOf memmory error
6.what is o/p below program
public class testcalling {
public static void call(int a){
syso(primitive)
}
public static void call (Integer a){
syso(object)
psvm()
call(1);
ans : primitive
7.how hashmap works internally ?
8.can we declare abstract class without abstract method? why abstract class have non abstract
method
9.use of wai() and notify()
Round 2 and 3
1.internal implementation hashmap
2.new features of java 7? how we can write multiple catch block in java 7
3.multi-threding used in your project? how you create multiple thread in your project ?
4.sort below hashmap based value/based on interger value in key
hashmap hm=new hashmap ();
hm.put("1",1);
hm.put("10",10);
hm.put("2",2);
5.different way to iterate hashmap ?
6.how to create immutable class ?
7. what are new features of java 8 ?
8. can we catch nullpointer in custom exception
9.can we sort hashmap without using comparable or comaparator
10.architectere of your project ?
11.is below code executed successfully orthrow ouof memory
while(true){
Employees e=new Employee();
}
12.can we create composite primary keyon columns if their is already primary key on column ?
13.colleectin related changes done in JRE 7
14.which sdlc you use in your company ?
44.Capgemini
Round 1
1.whch collection maintain insertion order
2.what are interfaces in collection
3.what is transient
4.what is volatile
5.what is synchronization
6.what design pattern you know? it use in your project
7. what is static class
8. what is final, finally and finalized.?
9.how you you exposed web service ?
Round 2
1.Junit,Sonar
2.SDLC models used
department whose employee count more than average employees count of department
45.genapact
1.implement your hashcode in java
2.best way search elemem in 10*10 2d array. with each row has 10 element is sorted order like
1-10,11-20...
3.delete record who have same name and salary
delete rowid from emp where
rowid not in (select max(rowid) from emp
group by ename,sal);
46.capgemini
1.difference between map and set
2.10 player as threads each player needs to compare training before comes to coach how you
can implement it with executer framework
3.hashmap and hashcode & equal questions
4.find second largest in array.
5.difference between sleep() and wait()
6.find second largest salary in employee table
47.Genpact
1.difference between classnotfounf and NoClassDefFoumd
2.is multiple inheritance possible ?if yes then how
3.why you need interface of abstract class is present?
4.sort employees based first besed id,name and salary in single comapate method
5.how to compile and run below class through cmd
package xyz
public classA{}
6.what is immutable class in java
7.what is final keyword
8.can we reintialize non blank final variables in constructer
9. can we reintialize final variables in constructer
10.can we reintialize interface variables or it needs to be intialize at time declaration.
48.Agility nomura
1.OOPS principles ?difference between abstractions and inheritance
2.concurrnthashmap internal working ?
3.different way to create thread in java
4.what are the interfaces in java
5.what marker interface ?
6.what is interfaces ? when you create interface
7.how to create immutable class? why class is final in immutable class
8.java 7 new features