eClinicalWorks Interview Question

what is hashcode..? what is different between thread and runnable..? how to find second last max value in sql