Top 10 Google Interview Questions for Software Engineer - Books, Resources

These Google interview questions are some of my favorites collected from different sources. Every Programmer knows that Google is one of the best technology company and its dream for many software developers to work for google, but at same time interview process at google is very tough and only a few genuine intelligent programmers get through their interview process. Google interview questions have always been a good topic of discussion when few young software developer gathered around, I can still remember when one of my friends got a call from google for an interview then how the whole bunch was got excited. We have searched a lot on the internet on google interview questions and answers for him and us and then make a note of some of the best questions for preparation. I am listing down some google interview questions from that list. 

Difference between notify and notifyAll in Java - When and How to use

notify vs notifyAll in Java
What is the difference between notify and notifyAll method is one of the tricky Java questions, which is easy to answer but once Interviewer asks follow-up questions, you either got confused or not able to provide clear-cut and to the point answers? The main difference between notify and notifyAll is that notify method will only notify one Thread and notifyAll method will notify all Threads  which are waiting on that monitor or lock. By the way, this is something you have been reading in all over places and to be frank,  this statement despite being correct is not complete and its very difficult to understand difference between notify vs notifyAll by just reading this statement. Lot of questions comes in mind like

Which thread will be notified if I use notify()?
How do I know how many threads are waiting, so that I can use notifyAll() ?
How to call notify()?
What are these thread waiting for being notified etc?

Actually, discussion of notify and notifyAll is incomplete without discussing wait method in Java and I had touched based on this on my earlier article why to wait and notify must be called from synchronized context. In for order to get answer to those questions and understand difference between notify and notifyAll we will use a simple Java Thread example using wait and notify code :

Difference between ExecutorService.submit() and Executor.execute() methods in Java?

What is the difference between Executor.submit() and Executor.execute() method in Java? is one of the good multi-threading questions for experienced Java programmers, mostly asked in Investment Banks like Barclays, Deutsche Bank, or Citibank. A main difference between the submit() and execute() method is that ExecuterService.submit()can return result of computation because it has a return type of Future, but execute() method cannot return anything because it's return type is void. The core interface in Java 1.5's Executor framework is the Executor interface which defines the execute(Runnable task) method, whose primary purpose is to separate the task from its execution.