News

Using generics results in more robust code and avoids ClassCastExceptions in your Java programs. This in-depth tutorial introduces you to generics and their types and methods.
Java gives you the ability to dynamically create strings. Even after you set the string value, you can add more characters to the string value throughout the code. This process lets you build a ...
This post explains how to use classes in Java to build objects and organize your code. Also learn: constructors, static methods, and more!
Typesafe enums offer a better alternative to Java's traditional enumerated types. Here's how to use typesafe enums correctly in your Java code.
Quickly learn how to use the Java ternary operator and see how this simple programming construct can help make your conditional logic, if statements and return statements clearer and more concise.
For example, if Java infers a type to be a String, it will not assigned that type to an int or a float later on in the code. int x = 10; x = "ten"; // Error: violation of strong typing in Java When ...