Java code that uses traditional enumerated types is problematic. Java 5 gave us a better alternative in the form of typesafe enums. In this article, I introduce you to enumerated types and typesafe enums, show you how to declare a typesafe enum and …
Java 5 brought generics to the Java language. In this article, I introduce you to generics and discuss generic types, generic methods, generics and type inference, generics controversy, and generics and heap pollution. download
Get the code
Downloa…
Writing programs that work correctly at runtime can be challenging. This is because our assumptions about how our code will behave when executed are often wrong. Using Java’s assertions feature is one way to verify that your programming logic is sou…
You’ve probably encountered situations where you need to associate metadata (data that describes other data) with classes, methods, and/or other application elements. For example, your programming team might need to identify unfinished classes in a …
In my previous Java 101 tutorial, you learned how to better organize your code by declaring reference types (also known as classes and interfaces) as members of other reference types and blocks. I also showed you how to use nesting to avoid name con…
In my previous Java 101 tutorial, you learned how to better organize your code by declaring reference types (also known as classes and interfaces) as members of other reference types and blocks. I also showed you how to use nesting to avoid name con…
In my previous Java 101 tutorial, you learned how to better organize your code by declaring reference types (also known as classes and interfaces) as members of other reference types and blocks. I also showed you how to use nesting to avoid name con…
This tutorial series is a beginner’s guide to data structures and algorithms in Java. You’ll learn:
How to recognize and use array and list data structures in your Java programs.
Which algorithms work best with different types of array and list data…
This tutorial series is a beginner’s guide to data structures and algorithms in Java. You’ll learn:
How to recognize and use array and list data structures in your Java programs.
Which algorithms work best with different types of array and list data…
This tutorial series is a beginner’s guide to data structures and algorithms in Java. You’ll learn:
How to recognize and use array and list data structures in your Java programs.
Which algorithms work best with different types of array and list data…