Тёмный

Morgan Stanley Round-2 | 4-7 years of Experience. 

Code With Roy
Подписаться 3 тыс.
Просмотров 2,7 тыс.
50% 1

Welcome to Code With Roy !!
Here, we dive deep into the world of IT, covering a wide range of topics including Core Java concepts, Spring Boot, Microservices, Java interview experiences for both freshers and experienced professionals, and insights into the dynamic IT life.
Whether you're just starting your IT journey or looking to enhance your skills and knowledge, you'll find valuable content tailored to your needs. Our goal is to provide comprehensive resources, tutorials, tips, and real-world experiences to help you succeed in the ever-evolving technology field.
🎯 Ready to ace your interviews and level up your career? Book a personalized 1:1 mentorship session with me!
In this exclusive mentorship program, you'll get tailored guidance and expert insights to help you excel in your interviews and achieve your career goals. Whether you're preparing for a job interview, seeking career advice, or aiming for professional growth, I'm here to support you every step of the way.
Book Here ⬇️
topmate.io/deb...
Connect with me on LinkedIn for professional networking and updates: [LinkedIn Digital Debjeet]( / digitaldebjeet )
Join our Telegram channel for discussions, Q&A sessions, and exclusive content: [Telegram Channel](t.me/+sBtqK4uY...)
Don't forget to hit the subscribe button and turn on notifications so you never miss out on our latest uploads. Thank you for joining us on this exciting journey through the IT world!

Опубликовано:

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 23   
@exploreviralvideos
@exploreviralvideos 3 месяца назад
Second round was good. The design question about corona was good, it wil take some time to think in all perspective.
@codeAtoZ
@codeAtoZ 3 месяца назад
Yes... That question was very new for me
@ManishTiwari-or8zt
@ManishTiwari-or8zt 3 месяца назад
Spring does not manage the complete lifecycle of a prototype bean. We have to clean up prototype-scoped objects and release expensive resources that the prototype beans hold. With the help of BeanPostProcessor and DisposalBean interface we have to implmemt and write the clean up code. If someone need I can post the code here to show how to do that?
@codeAtoZ
@codeAtoZ 3 месяца назад
Yes sure... We all learn here from each other
@ManishTiwari-or8zt
@ManishTiwari-or8zt 3 месяца назад
@@codeAtoZ In the last question I think he was trying highlight below scenerio- If we are working on with the collection! We should pay attention to not lose the data List data = new ArrayList(); Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8).parallelStream().map(i -> { data.add(i); // // AVOID STATEFUL LAMBDA EXPRESSIONS! return i; }).forEachOrdered(i -> System.out.print(i + " ")); // 1 2 3 4 5 6 7 8 // [1, 3, 4, 5, 2] ->missing ! System.out.println(); System.out.println(data); For an ArrayList object, the JVM internally manages a primitive array of the same type. As the size of the dynamic ArrayList grows, a new, larger primitive array is periodically required. If two threads both trigger the array to be resized at the same time, a result can be lost, producing the unexpected value shown here. Solution : we can make use concurrent stream like ConcurrentHashMap , CopyOnWriteArrayList example- Stream stream1 = Stream.of("Debjeet", "Roy", "Code With Roy").parallel(); ConcurrentMap map = stream1 .collect(Collectors.toConcurrentMap(String::length, k -> k, (s1, s2) -> s1 + "," + s2)); System.out.println(map); // {3=Roy, 7=Debjeet, 13=Code With Roy} System.out.println(map.getClass()); // java.util.concurrent.ConcurrentHashMap
@ManishTiwari-or8zt
@ManishTiwari-or8zt 3 месяца назад
@@codeAtoZ In the last question I think he was trying highlight below scenerio- If we are working on with the collection! We should pay attention to not lose the data List data = new ArrayList(); Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8).parallelStream().map(i -> { data.add(i); // // AVOID STATEFUL LAMBDA EXPRESSIONS! return i; }).forEachOrdered(i -> System.out.print(i + " ")); // 1 2 3 4 5 6 7 8 // [1, 3, 4, 5, 2] ->missing ! System.out.println(); System.out.println(data); For an ArrayList object, the JVM internally manages a primitive array of the same type. As the size of the dynamic ArrayList grows, a new, larger primitive array is periodically required. If two threads both trigger the array to be resized at the same time, a result can be lost, producing the unexpected value shown here. Solution : we can make use concurrent stream like ConcurrentHashMap , CopyOnWriteArrayList example- Stream stream1 = Stream.of("Debjeet", "Roy", "Code With Roy").parallel(); ConcurrentMap map = stream1 .collect(Collectors.toConcurrentMap(String::length, k -> k, (s1, s2) -> s1 + "," + s2)); System.out.println(map); // {3=Roy, 7=Debjeet, 13=Code With Roy} System.out.println(map.getClass()); // java.util.concurrent.ConcurrentHashMap
@ManishTiwari-or8zt
@ManishTiwari-or8zt 2 месяца назад
@@codeAtoZ Here is the code public class PrototypeBeanPostProcessor implements BeanPostProcessor, DisposableBean, ApplicationContextAware { private ApplicationContext context; List prototypeBeans = new LinkedList(); public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (context.isPrototype(beanName)) { synchronized (prototypeBeans) { prototypeBeans.add(bean); } } return bean; } public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { this.context = applicationContext; } public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { return bean; } public void destroy() throws Exception { synchronized (prototypeBeans) { for (Object bean : prototypeBeans) { if (bean instanceof DisposableBean) { DisposableBean disposable = (DisposableBean)bean; try { disposable.destroy(); } catch (Exception e) { e.printStackTrace(); } } } prototypeBeans.clear(); } } }
@ayush5018
@ayush5018 3 месяца назад
Hi, was this the final round and have u got the offer?
@codeAtoZ
@codeAtoZ 3 месяца назад
Yes
@babhijit
@babhijit 3 месяца назад
Did you get any offer from Morgan Stanley ? What was the position you were interviewed for ?
@babhijit
@babhijit 3 месяца назад
@@MithuMuni what do you mean ?
@codeAtoZ
@codeAtoZ 3 месяца назад
Yes
@mayanksharma1491
@mayanksharma1491 3 месяца назад
You don't get nervous before/ during interviews?... have you ever got blank during any interview?
@codeAtoZ
@codeAtoZ 3 месяца назад
Yes I do at times... But I try to back it up with as much nearby answers as possible. If I don't know it completely then I tell clearly.. Sorry I am not aware of it.
@mayanksharma1491
@mayanksharma1491 3 месяца назад
Approx how much are they offering?
@codeAtoZ
@codeAtoZ 3 месяца назад
In the range of 25 - 31
@mansoor_333
@mansoor_333 3 месяца назад
that corona question blew my mind
@codeAtoZ
@codeAtoZ 3 месяца назад
Yes.. Me too
@Rudar263
@Rudar263 3 месяца назад
Did you get selected
@codeAtoZ
@codeAtoZ 3 месяца назад
Yes
@abhishekmaahraz3295
@abhishekmaahraz3295 3 месяца назад
What was asked in Round 1 ?
@codeAtoZ
@codeAtoZ 3 месяца назад
I have already uploaded video... See in playlist
@ManishTiwari-or8zt
@ManishTiwari-or8zt 2 месяца назад
Here is the code public class PrototypeBeanPostProcessor implements BeanPostProcessor, DisposableBean, ApplicationContextAware { private ApplicationContext context; List prototypeBeans = new LinkedList(); public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (context.isPrototype(beanName)) { synchronized (prototypeBeans) { prototypeBeans.add(bean); } } return bean; } public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { this.context = applicationContext; } public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { return bean; } public void destroy() throws Exception { synchronized (prototypeBeans) { for (Object bean : prototypeBeans) { if (bean instanceof DisposableBean) { DisposableBean disposable = (DisposableBean)bean; try { disposable.destroy(); } catch (Exception e) { e.printStackTrace(); } } } prototypeBeans.clear(); } } }
Далее
Flipping Robot vs Heavier And Heavier Objects
00:34
Просмотров 39 млн
Viral Video of a Man's Crazy Job Interview
16:02
Просмотров 1,3 млн
7 Years of Software Engineering Advice in 18 Minutes
18:32
Java Spring Boot 2 Years Interview Experience
31:31
Просмотров 4,1 тыс.
Microservices are Technical Debt
31:59
Просмотров 510 тыс.