Below interview questions asked in HCL in first 2 technical rounds for Java Profile
- What are the oops concepts?
- Comparator and comoarable differwnce?
- TreeSet<stringbuilder> can we create?
- Different ways of instantiation?
- Diff b/w queue and dqueue?
- Diff b/w iterator and list iterator?
- Class level locking and object level locking?
- Do we have distuctors in java?
- Can we call gc , will that clean up memory?
- Any searching and sorting algorithms?
- How can we say How much space is consuming by any object?
- How can we get all members of class?
- Exception hierarchy?
- Collection hierarchy?
- How Hashmap works internally?
- What is fast fail and fast safe?
- How can we avoid fail fast?
- Why hash map domminates gc?
- What is weakhashmap?
- What is identityhashmap?
- What is concurrent hashmap?
- CopyorwriteArrayList?
- How will get set values in reverse order?
- if hashmap having fixed 5 value, in that case how will you create map object?
- What is the intial size of ArrayList?How arraylist size get increase?
- how can we synchronize any collection?
- How can we sort collection values?
- how to convert arraylist to array vice versa?
- Contract b/w equals and hashcode?
- How can you check code performance?
- Can overridden method can throw checked exception?
- Instance block and static block?
- When will static block get executed?
- Can two overloading methods can return two data types?
- How can we return multiple data type values from method?
- What ar the memory areas do we have in jvm?
- What is JIT?
- Difference b/w path and classpath?
- Code for reverse number?
- Given string is polindram or not?
- Diff b/w replace and replaceall?
- How will you handle null pointer exceptions?
- Architecture of your current project?
- Synchronization?
- Difference b/w synch block and synch method?
- Transiat ?
- Volatile?
- How can you confirm whether string is immutable?
- Char count given string?
- Few questions on serialization?
Questions on below concepts
Threads
Runnable thread
Notify notifyall
Join
Wait and sleep?
M(String s)
M(object o)
M(null) which will get called?
M(string... S) what does it mean?
If you define 2 methods as below
M(string... S)
M(string... S,string s)
Will class compiles successfully?
Sb s=new sb("aa");
Sb s1=new sb("dd");
s.equals(s1) is true/false?
int i=10;
Try{
Return ++i; //try return
} finally{
Return ++i;//final return
}
Which return statement will return?
No comments:
Post a Comment