techieDeep
BAN USER
- 2of 2 votes
AnswersHow the java calculate the size for Hashset and what would b the output. Jsutify your answer with Java point of view..
- techieDeep in United States
import java.util.HashSet;
public class HashTest {
private String str;
public HashTest(String str) {
this.str = str;
}
@Override
public String toString() {
return str;
}
@Override
public int hashCode() {
return this.str.hashCode();
}
public static void main(String args[]) {
HashTest h1 = new HashTest("1");
HashTest h2 = new HashTest("1");
String s1 = new String("2");
String s2 = new String("2");
HashSet<Object> hs = new HashSet<Object>();
hs.add(h1);
hs.add(h2);
hs.add(s1);
hs.add(s2);
System.out.print(hs.size());
}
}| Report Duplicate | Flag | PURGE
Adobe SDE1 - 1of 1 vote
AnswersWrite a C program to find the number of shift required to convert one string to another. Check all the corner cases.
- techieDeep in United States
Eg: abc to acb o/p shd be 2 as 'b' shifted from 1st index to 2nd and 'c' shifted to 1st from second.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 0of 0 votes
AnswersIs any specific use of empty class??
- techieDeep in India| Report Duplicate | Flag | PURGE
Adobe Applications Developer - 0of 0 votes
AnswersHow the JVM is implemented to handles try catch finally .
- techieDeep in United States
Elaborate by taking any JVM.| Report Duplicate | Flag | PURGE
Adobe Software Engineer / Developer - 0of 0 votes
AnswersWhat are the run time exceptions in java related to class and object creation??
class A{ ... dosomething(); .. } class B extends A{ ... dosomething(); donothing(); ... } class C expends A{ } A a =new B(); a.donothing(); //which type of error B b=new A(); A a1=new C(); B b=(b)a1;
Pls give input for anyother cases you may think better.
- techieDeep in United States| Report Duplicate | Flag | PURGE
Adobe Software Engineer / Developer
@hprem:
Yes i understand but for size of m bucket you need some memory to store location of there buckets . Am i right?
well, JVM generally gives a default handler for not handled exception ... This is the concept related to exception propagation, Right?? But how this handler complete the task??
- techieDeep January 28, 2013@hprem:
How the storage is O(1) ... I think it would be O(n) because you are mapping a data with some key values. Tell me if i am wrong..
@Saurav and Rage:
Nyc points and implementation. But can you elaborate about its reusability.
RepI am working as a Software quality assurance analyst in Turtle's Records company. I look for flaws and weaknesses ...
RepDedicated administrative assistant with years of experience managing large and small offices. I have worked with numerous branches,including payroll ...
Repaalexlingram, AT&T Customer service email at ABC TECH SUPPORT
I am Alex and I live in Colorado Springs . I am working as a International human resources manager and I ...
Repgarlandkrebs, Animator at ADP
Highly focused and seasoned magazine editor with vast experience in all stages of weekly and monthly magazine production. My aim ...
Repshanitajjana, +27655765355 SSD MONEY CLEANING CHEMICAL +27655765355 BLACK MONEY IN JOHANNESBURG, OMAN, SAUDI ARABIA, SUDAN, Somalia ,Zimbabwe Botswana at 247quickbookshelp
Hi I am Shanita from San Bernardino USA. I am working as a manager in flore company. I am outgoing ...
Repgiannanewhart, Cloud Support Associate at ABC TECH SUPPORT
I am Clinical managers, a type of medical and health services manager, and work as managers in both administrative areas ...
Repjoankelly306, Site Manager at EFI
Hi, I am Joan from Fairbanks, in USA. I have been a Food Product Manager in a Food Barn Company ...
Reprealspellcaster4, Cloud Support Associate at Aricent
Hi, I am from PA, United states. I believe in making the impossible possible because there’s no fun in ...
RepTimothyAYocum1, Android Engineer at ABC TECH SUPPORT
I am a medical or osteopathic doctor who specializes in eye and vision care. My work Ophthalmologists differ from optometrists ...
Repdelenestanf0, HR Executive at Agilent Technologies
Hi, I am a Clinical social worker. methods of prevention and treatment in providing mental-health/healthcare services, I also have ...
good... But can you give non rec wway of doing the same... ?
- techieDeep January 28, 2013