Академический Документы
Профессиональный Документы
Культура Документы
CABS
COBRA
------------------------------ ----------------
-------------------
Xxx hr 300
Xxx 400
46. Write a query to get unique rows. Display the name of the
employee and the sum of the salary department wise
47. Write a query to get employee name and department name
48. Same as question 1 , but also get the row with deptid as
null
49. What is hashing.Write Hash code and equals method code for
Emp class. What exception may be thrown here.
50. Exception handling(Runtime and compile time exceptions).
51. ClassNotFoundException when thrown and is this runtime or
compile time.
52. Overriding and overloading
53. Polymorphism.
54. Difference between array list and a hash map.
55. Static variable.
56. How do you implement thread.write the code for the two
ways.
57. What would happen when you write Thread.run();
58. Write down the JDBC code for any one of the statements.
59. In jdbc Class.forname() how many time this statement
excutes in a programme..They were trying to confuse me on this.
60. How does DriverManager.getConnection works.
61. Write exception hierarchy.
62. Joins.What is left outer join and left join.Is both same or
there is any difference.Write a query to join two table.
63. Select * from TableA,TableB .what will be the
output.Cartesian join.
64. About Project
65. Design pattern used in my project (Command Pattern)
66. Code snippet of Command pattern
67. Different ways of implementing thread. Why these different
ways in Java spec?
68. Directly calling run() method. What could be the
significance
69. How throws clause impacts in Function overriding?
70. What collection frameworks I used in project?
71. Why do we need to override hashcode & equals method?
72. Code snippet for above.
73. Exceptional handlings, why try-catch , why not throws? Why
throws?
74. How can a object be checked at Runtime?
75. Difference between instanceof keyword & isInstance? Why
both?
76. Code snippet for Singleton
77. Thread safe for singleton
78. Joins – Just a ques do u know that?
79. Tab1(EID,Ename,MgrId) with a record where mgr_id is null &
few records where mgr_id is not present in eid .
80. Ques is : Find the employees who have got managers
81. Write code to override equals(), hascode().
82. Write code to implement Comparable,Comparator for a given
class e.g. Person
83. Write code to create thread using Runnable.
84. What will happen if Thread.run() will be called
85. How does DriverManager works? He asked me after initially
telling me to write some JDBC code.
86. Write code to implement a HashSet.
87. Given a table with EmpId,EmpName and MgrId.Write a SQL
query to give emp name and corresponding manager name.
88. James Bond puzzle.
89. Write code to implement Singleton pattern
90. Write some code using Generics.
91. Given a table with columns Number, SquareRoot. Write a
query to return number, square root and square without using any
mathematical operator and functions.
92. Give a Datamodel to implement a DentalNursingHome.
93. Explain Serialization. Suppose i have a Connection object.
I want to close this connection before serializing and then
reopen it while deserializing.How will i do it?
Hashtable1 Hashtable1
1 A 1 A
2 B 3 E
3 C 4 F
2 B _
3 C E
4 _ F
Now Design a new class C which has got behavior of both A &
B without changing the classes A & B. Write code for ClassC
124. Scenario:
Given some elements, need to have all elements present
uniquely in some data structure. As well, need to have a
method exposed which returns data structure in sorted
format based on the input string parameter value sent to
the method.
Code snippet for the same.
125. Scenario:
There is some XML which external system sends to our
system. It has got a tag whose values can vary between any
of 50 different values we know. Out of these 50 values, if
we get first 10 values then we need to send the XML to
Formatter A, for next 20 , we need to send XML to Formatter
B, & the remaining 20 values to Formatter C. This can be
achieved by reading value from the tag & having an If
condition which checks the value present in the tag with 50
String constants we have, however having an if condition
this way is a crude approach. What is the better approach
to suffice this?
Hydra
March 6, 2009
Son1 Son2
Son3 Son4
189. Date class Pass a string as 01-01-2009 IST & 0ther as 01-
01-2009 EST. how do u compare these two dates. Many questions on
Date API.
190. I have a string “abbbscaaas”, Need to find out the first
non repeating character.
191. About previous projects
192. Design a class to retrieve employees starting with Manager
followed ny his subordinates
193. What is ORM
194. Design a mechanism to cache the Employee objects. However
the cached employee objects should’nt have any mechnism to change
the state. However the state of the employee objects can be
changed only by the mechanism which is caching the objects. As
well I should prevent client classes which is using my cached
employee objects from doing new employee()
195. I have two lists, I need to merge them. However I want to
ensure that there are no duplicates in that post merging.
196. What are Db indexes?
197. Different types of indexes.
198. I have a table containg data of employee assignments like
EMPID Department Date
1 D1 01/01/2008
1 D2 01/02/2008
1 D2 01/05/2008
1 D2 01/09/2008
1 D3 01/01/2009
1 D4 01/07/2009
1 D1 01/09/2009
1 D2 01/11/2009
March -16th
Round1:
Round3:
Round4:
a==b
c==a
a.equals(b)
Round5:
227. What are the technologies you know and level of expertise?
228. If two MDB-A and MDB-B are listening on the same queue, and
we want that a certain kind of messages are sent to MDB-A and
certain kind of messages are sent to MDB-B, how can that be
achieved?(I told that about selectors)
229. If there are no selectors, then which MDB will get the
messages?
230. Where do the messages get stored?
231. Can we go and add our own messages to the JMS filestore?
232. How does Stateful session bean manage the state?
233. How do you manage transactions with EJB?
234. Design a database for the below hierarchy:
Father
Son1 Son2
Son3 Son4