Accenture NJ mostly ask question on Collection like
1)How to sort Objcts and how treeset sort them
2)Explain mechanism of Hashcode finding in Java
3)Name some of the Sorted collection.
Answers were Sorted based on User's Feedback
Answer / aditya sharma
1)How to sort Objcts and how treeset sort them
Ans: *) We can sort objects using comparable and comparator
interface.
*) Treeset sort object using comparable interface.
2) Explain mechanism of Hashcode finding in Java
Ans:
1) Write [ java *Class name* ] = you will get class name and
hashCode no.
2) Implement the hashCode method in your class and call
hashCode method.
3) Name some of the Sorted collection.
Ans:
1) TreeSet
2) TreeMap
| Is This Answer Correct ? | 11 Yes | 0 No |
Answer / guest
The answer to all this question is easy but i think they
want answer from internal mechanism how it works inside
Java!!!
You think you answered well but they will always fail you
just hate then
| Is This Answer Correct ? | 1 Yes | 10 No |
Explain why wait(), notify() and notifyall() methods are in object class rather than in thread class?
Hi am an mca graduate . i have done bsc maths in my degree . every company asks me why you make shift from maths group to computere field . What i need to answer?
Is vector thread safe in java?
What is the difference between jsp and servlet?
Can a class extend more than one class?
how many types of Inheritance?
What is charat java?
How do you read and print a string in java?
What is difference between checked and unchecked exception in java?
What is static variable and static method?
32 Answers Accenture, Prolific, Prolifics, TCS, TNH,
What is the difference between form & report?
Can a abstract class be declared final?