Arrays allow for the storage and retrieval of an arbitrary quantity of values. They are analogous to vectors in mathematics. Arrays of arrays are analogous to matrices, and act as multidimensional arrays. Arrays can store any data of any type: primitives such as
int or reference types such as
Stream represents a sequence of elements and supports different kind of operations to perform computations upon those elements. With Java 8,
Collection interface has two methods to generate a
Stream operations are either intermediate or terminal. Intermediate operations return a
Stream so multiple intermediate operations can be chained before the
Stream is closed. Terminal operations are either void or return a non-stream result.
Lambda expressions provide a clear and concise way of implementing a single-method interface using an expression. They allow you to reduce the amount of code you have to create and maintain. While similar to anonymous classes, they have no type information by themselves. Type inference needs to happen.
Method references implement functional interfaces using existing methods rather than expressions. They belong to the lambda family as well.
java.lang.String) are pieces of text stored in your program. Strings are not a primitive data type in Java, however, they are very common in Java programs.
In Java, Strings are immutable, meaning that they cannot be changed. (Click here for a more thorough explanation of immutability.)
Generics are a facility of generic programming that extend Java's type system to allow a type or method to operate on objects of various types while providing compile-time type safety. In particular, the Java collections framework supports generics to specify the type of objects stored in a collection instance.
Common Java Pitfalls
This topic outlines some of the common mistakes made by beginners in Java.
This includes any common mistakes in use of the Java language or understanding of the run-time environment.
Mistakes associated with specific APIs can be described in topics specific to those APIs. Strings are a special case; they're covered in the Java Language Specification. Details other than common mistakes can be described in this topic on Strings.
Oracle Official Code Standard
Oracle official style guide for the Java Programming Language is a standard followed by developers at Oracle and recommended to be followed by any other Java developer. It covers filenames, file organization, indentation, comments, declarations, statements, white space, naming conventions, programming practices and includes a code example.
Exceptions and exception handling
Objects of type
Throwable and its subtypes can be sent up the stack with the
throw keyword and caught with