Interviews Public

Interviews

Sabera Yasmin
Course by Sabera Yasmin, updated more than 1 year ago Contributors

Description

Series of interviews i faced as a java developer through out my career

Module Information

Description

04 oct 2018 4 pm
No tags specified
1. Tell me about yourself ? 2. Tell me your roles and responsibilities ? 3. What is bridge design pattern ?       Bridge design pattern is a useful design pattern used to decouple abstraction from its implementation so that the 2 can vary independently. The bridge pattern is useful when both the class and what it does vary, often because changes in the class can be made easily with minimal prior knowledge about the program. The bridge pattern allows us to avoid compile-time binding between an abstraction and its implementation. This is so that an implementation can be selected at run-time. for more details :  https://dzone.com/articles/bridge-design-pattern-in-java https://www.journaldev.com/1491/bridge-design-pattern-java   4. How Spring MVC works ? https://www.tutorialspoint.com/spring/spring_web_mvc_framework.htm 5. What is DispatcherServlet and ContextLoaderListener ? https://howtodoinjava.com/spring-mvc/contextloaderlistener-vs-dispatcherservlet/
Show less

Description

09 oct 2018
No tags specified
Test : 1) method(Object obj){} method(String str){} main(){    method(null); } 2) Write a Program to get the nth Prime Number, when n is the input ?
Show less

Description

13 Oct 2018
No tags specified
1) OOPs Concept.    Abstraction          Hiding internal details and showing functionality is known as abstraction. For example phone call, we don't know the          internal processing.          In Java, we use abstract class and interface to achieve abstraction.    Polymorphism          If one task is performed by different ways, it is known as polymorphism. For example: to convince the customer          differently, to draw something, for example, shape, triangle, rectangle, etc.          In Java, we use method overloading and method overriding to achieve polymorphism.    Inheritence          When one object acquires all the properties and behaviors of a parent object, it is known as inheritance. It provides          code reusability. It is used to achieve runtime polymorphism.    Encapsulation          Binding (or wrapping) code and data together into a single unit are known as encapsulation. For example capsule, it is          wrapped with different medicines.          A java class is the example of encapsulation. Java bean is the fully encapsulated class because all the data members          are private here. 2) Difference between Abstraction and Encapsulation    Encapsulation is wrapping, just hiding properties and methods. Encapsulation is used for hide the code and data in    a single unit to protect the data from the outside the world. Class is the best example    of encapsulation. Abstraction refers to showing only the necessary details to the intended user. 3) Difference between HashMap and ConcurrentHashMap HashMap is non-Synchronized in nature i.e. HashMap is not Thread-safe whereas ConcurrentHashMap is Thread-safe in nature. HashMap performance is relatively high because it is non-synchronized in nature and any number of threads can perform simultaneously. But ConcurrentHashMap performance is low sometimes because sometimes Threads are required to wait on ConcurrentHashMap. While one thread is Iterating the HashMap object, if other thread try to add/modify the contents of Object then we will get Run-time exception saying ConcurrentModificationException. Whereas In ConcurrentHashMap we wont get any exception while performing any modification at the time of Iteration. 4) Difference between HashSet and HashMap    Differences:       HASHSET          HashSet class implements the Set interface          In HashSet we store objects(elements or values) e.g. If we have a HashSet of string elements then it could depict a set          of HashSet elements: {“Hello”, “Hi”, “Bye”, “Run”}          HashSet does not allow duplicate elements that means you can not store duplicate values in HashSet.          HashSet permits to have a single null value.       HASHMAP          HashMap class implements the Map interface          HashMap is used for storing key & value pairs. In short it maintains the mapping of key & value (The HashMap class is           roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls.) This is how you could represent          HashMap elements if it has integer key and value of String type: e.g. {1->”Hello”, 2->”Hi”, 3->”Bye”, 4->”Run”}          HashMap does not allow duplicate keys however it allows to have duplicate values.          HashMap permits single null key and any number of null values. 5)
Show less
Show full summary Hide full summary