@ amolpalekar
Whatever I understand from your statement I created following code
See code below
Output of the program
Main Done
thread1 before lock1.method1
thread1 calling method1
thread1 after lock1.method1
thread1 before lock1.method2
thread1 calling method2
thread1 after lock1.method2
thread1 before lock2.method1
thread1 calling method1
thread2 before lock1.method1
thread2 calling method1
thread2 after lock1.method1
thread2 before lock1.method2
thread2 calling method2
thread2 after lock1.method2
thread2 before lock2.method1
thread1 after lock2.method1
thread1 before lock2.method2
thread1 calling method2
thread1 after lock2.method2
thread2 calling method1
thread2 after lock2.method1
thread2 before lock2.method2
thread2 calling method2
thread2 after lock2.method2
If thread1 have lock1 then thread2 can't get lock1 and if thread1 have lock2 then thread2 can't get lock2 at same time
If thread1 have lock1 then thread2 can have lock2 and if thread1 have lock2 then thread2 can have lock1 at same time
Q1) Can two different threads can access 2 different synchronized methods of the same class using different locks ?
It is possible
Q2) Can thread2 access same synchronized method1 using different lock at that time?
It is possible but thread1 should not have any of two locks or thread1 should completed method call and release both locks.
I hope this may help you
Correct me if I am wrong