Lovepreet S (Java Experts) ☁️ (@java_experts) header
Lovepreet S (Java Experts) ☁️ (@java_experts) profile picture

★ Sr Backend Developer | 9+ years Experience ★ Sharing my experience via tweets & threads ★ Explains complex concepts

Punjab
Joined May 2022
Q: How do you share variable in thread life cycle? A: Java ThreadLocal class allows the storage of data that is specific to each thread separately. It is often used to implement thread-specific context or to avoid synchronisation for thread-local data
4
1,093
Replying to @dolapo_47
Lets break the threads together
1
76
What do you think most difficult/complex topic in JAVA ?
7
1
21
3,734
Handle Resource Cleanup with try-with-resources: Use try-with-resources when dealing with resources like as files or database connections to guarantee that resources are automatically closed at the conclusion of the block, limiting the possibility of resource leaks.
1
256
Defensive programming: The approach emphasises anticipating and handling potential errors, exceptional conditions, and unexpected inputs in a proactive manner it includes: -Input Validation -Fail Fast -Assertions -Avoid Magic Numbers -Handle Edge Cases -Graceful Error handling
1
69
Functional Approach: Rather to directly catching and managing exceptions, functional techniques frequently handle error scenarios through higher-order functions such as map, flatMap, and fold. the `divide` function returns an `Optional<Integer>` instead of throwing an exception
1
62
6 Effective error handling in Java: Discover the best practices and strategies to ensure smooth sailing in our Java applications! 🚀🔍
2
2
1
7
1,330
Coding Paradigms: Exploring the Art of Software Development 🚀🎨 #CodingParadigms #SoftwareEngineering Lets learn the type of coding paradigms it helps in - Architectural Decisions - Critical Thinking - Code Optimisations - Future-Proofing
1
4
1,047
5/ Producer-Consumer: Very basic design pattern, but it has the ability to address all use cases in threads. In simple terms there are always producers and consumers visualising application in terms of the producer and consumer paradigms, can help applying this design pattern.
1
6
305