Thread: Project Manager Round Question in Sasken Communication

Forum : Job discussions   12-8-2016 12:00:00 AM
User Image
Basanta2041

Newbie

Joined: Apr 20, 2017

Points: 100

Threads: 27

Posts: 139

Project Manager Round Question in Sasken Communication

| Quote Date : Aug 12, 2016    Views:5379    

[code] Telephonic Second round question 1.I have a one class who contain 5 methods But my requirement is in between 5 methods I want to apply locking mechanism that multiple thread can?t access at a time but rest 3 methods can be access by multiple thread at a time NOTE:Without using Synchronized key word 2.I want to insert 2 list object in Map one all value as key and another list all value as a value in map with single iteration. 3.what is the difference between One to many and many to one association and where I have to prefer which one 4.can I access one controller method by using 2 different url if not if my scenario is like this how can I resolve it. 5.How I will know my Rest API is secure means that can?t be accessed by other except my client. [|code]

tags: java

Comments

User Image
Sabyasachi

Newbie

Joined : Feb 19, 2018

Points : 100

Threads: 0

Posts: 5

Re: Project Manager Round Question in Sasken Communication

Reply Date : Mar 18, 2018

can u explain Rentrant Lock mechanism?

yup Aditya your approach is absolutely R8 we should prefer for Rentrant Lock mechanism

Replied by Basanta2041
User Image
Asish2686

Newbie

Joined : Apr 20, 2017

Points : 110

Threads: 12

Posts: 15

Re: Project Manager Round Question in Sasken Communication

Reply Date : May 21, 2017

[code] Telephonic Second round question 1.I have a one class who contain 5 methods But my requirement is in between 5 methods I want to apply locking mechanism that multiple thread can?t access at a time but rest 3 methods can be access by multiple thread at a time NOTE:Without using Synchronized key word ?

Hello Boss in this question interviewer may wants to know whether you know locking mechanism or not. Because for my knowledge, if you are not using synchronized keyword, then there is an alternate ways is there, that was introduced in JDK 1.5 version that is java.util.concurrent.lock package.If you use that Lock interface, then you can easily lock any kind of object.

User Image
Basanta2041

Newbie

Joined : Apr 20, 2017

Points : 100

Threads: 27

Posts: 139

Re: Project Manager Round Question in Sasken Communication

Reply Date : Aug 12, 2016

Boss any one can reply for 1,5 . I tried but interviewer not satisfied with mah answer. 4. Answer definitely no cause we can't take 2 value in @RequestMapping but it can be possible in configuration approach If m not wrong. Let me know

User Image
Basanta2041

Newbie

Joined : Apr 20, 2017

Points : 100

Threads: 27

Posts: 139

Re: Project Manager Round Question in Sasken Communication

Reply Date : Aug 15, 2016

Sriman sir at least I expect answer from u r side. Otherwise my dobut will be dobut fr ever

Load More

No More Comments