Wednesday 6 July 2016

hcl java interview questions

Below interview questions asked in HCL in first 2 technical rounds for Java Profile

  1. What are the oops concepts?
  2. Comparator and comoarable differwnce?
  3. TreeSet<stringbuilder> can we create?
  4. Different ways of instantiation?
  5. Diff b/w queue and dqueue?
  6. Diff b/w iterator and list iterator?
  7. Class level locking and object level locking?
  8. Do we have distuctors in java?
  9. Can we call gc , will that clean up memory?
  10. Any searching and sorting algorithms?
  11. How can we say How much space is consuming by any object?
  12. How can we get all members of class?
  13. Exception hierarchy?
  14. Collection hierarchy?
  15. How Hashmap works internally?
  16. What is fast fail and fast safe?
  17. How can we avoid fail fast?
  18. Why hash map domminates gc?
  19. What is weakhashmap?
  20. What is identityhashmap?
  21. What is concurrent hashmap?
  22. CopyorwriteArrayList?
  23. How will get set values in reverse order?
  24. if hashmap having fixed 5 value, in that case how will you create map object?
  25. What is the intial size of ArrayList?How arraylist size get increase?
  26. how can we synchronize any collection?
  27. How can we sort collection values?
  28. how to convert arraylist to array vice versa?
  29. Contract b/w equals and hashcode? 
  30. How can you check code performance?
  31. Can overridden method can throw checked exception?
  32. Instance block and static block?
  33. When will static block get executed?
  34. Can two overloading methods can return two data types?
  35. How can we return multiple data type values from method?
  36. What ar the memory areas do we have in jvm?
  37. What is JIT?
  38. Difference b/w path and classpath?
  39. Code for reverse number?
  40. Given string is polindram or not?
  41. Diff b/w replace and replaceall?
  42. How will you handle null pointer exceptions?
  43. Architecture of your current project?
  44. Synchronization?
  45. Difference b/w synch block and synch method?
  46. Transiat ?
  47. Volatile?
  48. How can you confirm whether string is immutable?
  49. Char count given string?
  50. 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
}

No comments:

Post a Comment