Blue Jeans Interview Question for Principal Software Engineers


Country: India




Comment hidden because of low score. Click to expand.
0
of 0 vote

The object upon which the method is being executed.

- zxjcarrot March 21, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Question is not clear. why the this object only. You can call other non synchronized methods when one thread is executing synchronized methods right ?

- Vib March 22, 2015 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

The Object that is actually synchronized while invoking a synchronised instance method (non-static) is the 'this' of scope of this method- which means - the class that contains this method as its instances' methods.

- ItayMegera March 25, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

when thread t1 is executing on synch method1() and nonsynch method2. it has to acquire a lock on calling object of method1() but not for method2().

say for example: there are two threads t1 and t2. and 3 mothods A(), B() and C();

Method A() and B() are sycnhronized but method C() is not.
So, t1 and t2 both can execute C() without acquiring a lock but they (t1 and t2) need to acquire a lock for A() and B(). Means only one thread can execute A() or B() at a time.

- hirrus.pandya March 25, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

If synchronized method is an instance method, then the called object will be locked. but if synchronized method is an static method, then the Classname.class object will be locked.

- Purushottam.Singh March 26, 2015 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More