Learn when to use setter methods or constructors for setting the value of a variable in Java.
Search Results for: Java methods
Parse Java Source Code and Extract Methods
A quick and practical guide to parsing Java source code and extracting methods.
Inter-Process Communication Methods in Java
A quick and practical guide to inter-process communication in Java.
Unnamed Classes and Instance Main Methods in Java 21
Learn about the unnamed classes and instance main methods in Java 21.
Performance Comparison Between Different Java String Concatenation Methods
Explore different string concatenation methods in Java and evaluate their performance using JMH.
Class Methods vs Instance Methods in Java
A brief comparison between class and instance methods in Java.
Use Cases for Static Methods in Java
Java allows us to declare functions as static. We look at what this means, how static functions differ from others, and some common use cases for preferring static functions.
Unit Test Private Methods in Java
Why it’s not a good idea to test a private method and how to do it if it’s extremely necessary.
Java Map – keySet() vs. entrySet() vs. values() Methods
Learn how to use the keySet(), entrySet() and values() methods of the Map interface in Java.
Private Methods in Java Interfaces
Learn how to define private methods within an interface and how we can use them from both static and non-static contexts.
Methods in Java
Learn all about methods in Java, from basic method syntax to overloading, as well as how to call methods.
Evaluation of Methods References in Java
Learn about Evaluation of Methods References in Java
String toLowerCase and toUpperCase Methods in Java
Learn about Java’s String toUpperCase and toLowerCase methods
The Java Native Keyword and Methods
Learn the basics of the Java native keywords and methods.
Java Constructors vs Static Factory Methods
Learn about static factory methods in Java and why they’re sometimes preferred over constructors for instantiating and initializing objects.
Java 8 Math New Methods
Learn about the new Math methods brought by Java 8
wait and notify() Methods in Java
Learn how to use wait() and notify() to solve synchronization problems in Java.
Static and Default Methods in Interfaces in Java
Learn how to write and use static and default methods in Java interfaces.
Call Methods at Runtime Using Java Reflection
A quick and practical guide to runtime method invocation using the Java Reflection API.
Java Convenience Factory Methods for Collections
A quick and practical guide to creating collections and maps using Java 9 factory methods.