android developer interview questions shared by candidates
What is a volatile variable, and why would you use it?
Volatile keyword is used during multi-threading when you want the threads to edit this variable value. It ensures that the value of the variable is not cached and is stored directly in the main memory. hence, enabling concurrent usage of the variable by different threads.
Consider a single threaded single processor environment. Do you still need a volatile?
(this is a little easier to explain if it's drawn out, but I'll try my best to do it here) Given some integer N = 2^k which represents an NxN matrix, write a function that fills the matrix with 'L' shapes, such that the entire matrix is filled except for 1 empty space. For example, a 2x2 matrix would have 3 spaces filled with one of the corners empty. And a 4x4 matrix would have the entire outer row of spaces filled, with the center 4 filled the same way the 2x2 matrix is filled.
See Interview Questions for Similar Jobs
- Software Engineer
- IOS Developer
- Android Developer
- Software Developer
- Senior IOS Developer
- IOS Engineer
- Ios Software Engineer
- Senior Software Engineer
- Software Engineer Intern
- Android Engineer
- Software Engineering
- Android Software Engineer