Learn that using either field declaration or constructor initialization is more of a preference.
Search Results for: variable declaration
Static Final Variables in Java
In this tutorial, we learn how to declare and initialize constant variables.
Synchronize a Static Variable Among Different Threads
Learn several ways to synchronize access to static variables among different threads.
JAVA_HOME vs PATH Environment Variables
Explore the differences between using the JAVA_HOME and PATH environment variables.
Declaring Val and Var Variables in Lombok
Learn how to use Lombok’s val and var to define local variables without specifying the type.
Capturing Method Arguments When Running Spock Tests
Learn how to capture method arguments using Spock’s Stubs, Mocks, and Spies using Closures.
Parse Java Source Code and Extract Methods
A quick and practical guide to parsing Java source code and extracting methods.
Analyze, Generate and Transform Code Using Spoon in Java
Learn how to use the Spoon library to analyze and modify Java source code.
The Java final Keyword – Impact on Performance
Explore if there are any performance benefits from using the final keyword on a variable, method, and class
Difference Between JSF, Servlet, and JSP
Explore the purpose of each technology, its lifecycle, and prominent features.
The “Cannot find symbol” Compilation Error
Review what compilation errors are, and then specifically explain what the “cannot find symbol” error is and how it’s caused.
Introduction to Project Amber
A quick and practical overview of Project Amber for Java.
Guide to Google Guice
A quick, practical guide to dependency injection in Google Guice.
Java Primitive Conversions
The most useful conversions of Java primitive types.
Guide to JavaServer Pages (JSP)
A quick and practical intro to JSP.
Implementing GraphQL Mutation Without Returning Data
Explore techniques for implementing GraphQL mutations without retrieving or returning specific information.
Improving Test Coverage and Readability With Spock’s Data Pipes and Tables
Learn how to use Spock’s data feeds in a where block.
All the Ways Java Uses the Colon Character
Learn how Java uses the colon character in a variety of different ways.
Convert an XML File to CSV File
Learn how to quickly convert XML files to CSV using Java
Unnamed Classes and Instance Main Methods in Java 21
Learn about the unnamed classes and instance main methods in Java 21.