Java 8 stream api sample code to join a list of strings using another character alongwith a conditional flow and also to find distinct and sorted result
Learn how to use arrays in Java with this comprehensive guide. Includes information on declaring, accessing, and iterating through arrays, as well as examples of 2D and 3D arrays.
Confused about Checked and Unchecked Exceptions? Do not be, Check out this article to understand when to use them and how to handle these exceptions and yes, unchecked exceptions are not the same as runtime exceptions.
What is a Hashing technique in Java? How to implement using a hash table? Different types of hashing algorithms, Benefits and drawbacks, when and when not to use.
Learn about Java Multithreading in this tutorial with examples, best practices, performance, deadlocks, synchronization, concurrency, security, and debugging.
What is java exception handling, How to write custom exceptions in java with exception hierarchy using try-catch, throw and throws keyword, and finally block.
Java generics are a powerful feature that can be used to improve the safety, readability, and maintainability of Java code. Generics can be used when working with collections, generic methods, and generic types. Use generics wisely and avoid using them in situations where they may not be appropriate.
Java annotations are metadata that can be used to provide information about code, control behavior, or be processed by tools. @ symbol is used to create and use annotations.
Java is considered as secure programming language because of its security apis, better memory management, type safety, sandboxing and bytecode verification.
What's New in Java LTS Versions 8, 11, and 17? Lambda Expression, Functional Interfaces, Streams API, new HTTP client API, new File I/O API, Vector API, and many more. Check out.
Java access modifiers control the visibility of classes, variables, methods, and other members of a Java program. There are four access modifiers in Java.
String is a good candidate for HashMap in Java because of features like immutability, hashability and equality, making it ideal for storing and retrieving objects efficiently.
Object-oriented programming, commonly known as OOPs is a programming style to solve a problem using encapsulation, abstraction, inheritance, and polymorphism.
Inheritance in Java is one of the four pillars of OOPS. It depicts a parent-child relationship between classes. It follows an order of execution of constructors.
The term Functional Interface was introduced in Java 8. Functional interfaces are the interfaces which have only one abstract (non-implemented) method.
Is it pass-by-reference or pass-by-value in Java? Primitive type is passed by value and objects passed by reference, understand Java's Pass-by-Value Mechanism.
Lambda expressions is one of java 8 features and used to write anonymous methods of functional interfaces. It has turned Java into functional-style programming.
Check out the difference between String and StringBuffer or Mutable and Immutable classes. Also, learn about the benefit of an immutable object over a mutable object.
How about a Few Useful Java/J2EE Tips? Learn how to disable Maven download progress indication and a few other IllegalAccessError and NoClassDefFoundError issues.
Core Java interview questions with answers related to concepts, multi-threading, exception handling, generics, annotations, streams lambda etc. for all level.