Array in Java

In this post we’ll talk about one of the programming construct array in Java. Topics covered are how to declare an array, how to create and initialize an array, how to store elements in an array and how to access those elements using array indexes, types of arrays in Java.…

Continue reading

Methods in Java

In Java programming language when you create a class it contains variables and methods. In this tutorial we’ll learn about Java methods. In the post Writing First Java Program we have already seen one method; main method which begins the execution of the program. Methods in Java A method is…

Continue reading

Package in Java

A package in Java is used to group a set of related classes and interfaces. In a big Java application containing hundreds or thousands of individual classes, grouping related classes and interfaces into packages helps to keep things organized. Package structure in Java Packages follow the same structure as directories…

Continue reading

Method Reference in Java

In the post Lambda expression in Java we have already seen how Lambda expression provides an instance of functional interface and implements the abstract method of the functional interface. Though sometimes, a lambda expression is used just to call an existing method. In those cases you can refer to the…

Continue reading