sarthakiter
BAN USER- 0of 0 votes
AnswersWhen singleton wont work as singleton??
- sarthakiter in India| Report Duplicate | Flag | PURGE
IBM Developer Program Engineer Java - 0of 0 votes
AnswerWhat is a weakHashMap??weak References??
- sarthakiter in India
xplain with example| Report Duplicate | Flag | PURGE
IBM Developer Program Engineer Java - 0of 0 votes
AnswerWhat is a Executer in threads??
- sarthakiter in India| Report Duplicate | Flag | PURGE
IBM Developer Program Engineer Threads - 0of 0 votes
Answersthere are list of random numbers like
- sarthakiter in India
1,3,23,76,908,34,256,12,43,11,2,-10
given an input suppose:13
find the combination of the numbers which adds up to 13.like 1+12=13,23+(-10)=13..like that| Report Duplicate | Flag | PURGE
Adobe Java Developer Algorithm - 0of 0 votes
Answerswrite a program so that it'll find all the possible combination of a string avoiding palidromes
- sarthakiter in United States
example:if the input is:"abcde"
output would be:"a","b","c","d","e","ab","ac","ad","ae","bc","bd","be","cd","ce","de","abc","abd","abe",...
but if you have already "abc",dont create"cba"| Report Duplicate | Flag | PURGE
Adobe Java Developer Java
syncronizing static method will give you class level lock
- sarthakiter July 26, 2012Volatile keyword is maily used so that Threads using the variable with volatile keyword will always have the latest /updated value of the variable.
- sarthakiter July 26, 2012When u should n't use FINAL
Variable:When you know u r gonna change the value of the variable.
Method:If you wanna override the method in child class dnt use FINAL.
Class:If want to inherit the class dnt use FINAL
after serialization if u have altered the class like making non-transient instance variable to transient/alter the class hierachy etc then while deserialization InvalidClassException will come as system will compare deserialized class version with serialized one.So to avoid this we give our own versionId instead of default one,so that it wont change n u can still play around your class.
- sarthakiter July 26, 2012it was in a 1st round written test
- sarthakiter July 12, 2012
the main difference is HashTable is syncronized and cant have NULL as key where as HashMap is not syncronized n can have NULL as key.
- sarthakiter July 26, 2012Collision will come into the picture where KEYS are same.In that case hashmap will go for KEYS.equals() and iterate the linked list in the hashbucket till its find correct KEY.