Posts

Showing posts from October, 2020

TCS interview questions

Introduce yourself  Tell me about your last project  Why were you migrating your application from IBM web sphere to Tomcat What kind of application was it ? (Spring mvc, normal rest api) Complete flow of your application ? What and all services you were consuming in your application? Why were you consuming those services ? How did you do it ?  What and technology you have used ? How did you work on exception handling in your application ? How can you write your own custom exception? What are the response code in case of rest services example 404,200 and in what case do you get these error ? How have you implemented REST API , how have you mapped request url to nay method? What is put , pots and delete method ? Complete end to end flow and functional understanding of the project ? How have you implemented database connection in your project ? How can you connect multiple database in your application? Have you worked on junit? Have  you worked on any ci/cd tool? How you used to deploy yo

Multithreading interview questions

What is multithreading concept? What is a thread? How many ways you can create a thread? Which one is better option to create a thread, by extending a thread class or by implementing Runnable interface? What is sleep method. What is yield method? What is join method? What is wait , notify and notifyAll methods , and why do they belong to Object class? What are the states of a thread ? what is a daemon thread ? What is callable? Difference between runnable and callable ? What is future object ? Programming of Future object ? What is ThreadPool ? What is executor and all its example ? What is countDownlatch and cyclic barrier ? Programming example of CountDownLatch and Cyclic barrier?  Producer consumer example ? How to create your own blocking queue? Concurrent HashMap? What is synchronization ? What is synchronized block and method ? What is volatile ? IllegalThreadStateException ?

Morgan Stanley Java Interview Questions

What is the difference between abstraction and polymorphism? What is encapsulation? How to print repeated no. stored in an array? using hash Set , using Hashmap How to swap to string without using third variable ? public class SwapToString { public static void main(String[] args) { // TODO Auto-generated method stub  String a="Hellow"; String b="World"; System.out.println("String before swap   "  + a+ "   "+b); a=a+b; b=a.substring(0,a.length()-b.length() ); System.out.println(b); System.out.println(a); System.out.println(a.substring(b.length())); } } ----------------------- o/p String before swap   Hellow   World Hellow HellowWorld World what and all design pattern you have worked on? What is factory design pattern ? What is singleton design pattern ? How do you create your own singleton class ? How do you create your own immutable class? Why is String immutable? What is the difference between String a="abc"; and String a = new