Mr D
BAN USER- 4of 4 votes
AnswersHow will you calculate the size of the object in java ? I gave answer for the serialized objects. The interviewer then modified the question that an ArrayList contains 10 non-serialized objects. How will you find out which object is the heaviest one ? He again added that the ArrayList is not a generic one, it may contain any kind of object like Organisation, Employee, Salary, PersonalDetails,OfficialDetails etc all object type. Now you have to find out which one is the heavy object through java program. He said there is some way you can measure the size of the object. Please help me.
- Mr D in India| Report Duplicate | Flag | PURGE
Goldman Sachs Java Developer Java - 0of 0 votes
AnswersWhich data structure and java design pattern are best fitted for Car Parking problem.
- Mr D in India| Report Duplicate | Flag | PURGE
Cisco Systems Algorithm - 0of 0 votes
AnswersI have two threads, both contain data from a database table. One thread performs some operation and update the data in the database table whereas second thread has not yet done any operation. Second thread does operation after some time and wants to update the operation. Since the first thread has already updated the data in the database table, second thread has stale data. How can we manage so that table should have the actual data not the stale data.
- Mr D in India| Report Duplicate | Flag | PURGE
Cisco Systems Java - 0of 0 votes
Answersint n=99;
- Mr D in India
int unsignedShift = n>>>2;
System.out.println("unsignedShift="+unsignedShift);
The above result gives "unsignedShift=24". The question is if 24 is given how can I get back the original value ie n ie 99. How to do it for both positive and negative integer. How to do it in java.| Report Duplicate | Flag | PURGE
Cisco Systems Java