Java Tutorials

This category contains Java basic tutorials

Static Keyword in Java

In this tutorial, we will learn about static keyword in Java. The main motive of the static keyword in Java is memory management. We can use static keyword with variable, method and block. An important thing to know that a static method, variable and block can be used without creating an object of the class. Static Variable: To make […]

Static Keyword in Java Read More »

String in Java

In this tutorial, we will learn about String in Java. Some students think String is a primitive data type like int or char but In java String is a very smart and immutable class which is part of java.lang package. When we right a char sequence it represents the object of String class. Check the following example to

String in Java Read More »

Methods in Java

In this tutorial, we will learn about Methods in Java. A method is a small piece(block) of code which can perform some special task and it only executes when we call this method. The method allows us to reuse code. Here we will learn how to create a Method and How to call a method in

Methods in Java Read More »

Arrays in Java

In this tutorial, we will learn about Arrays in Java. Till now we learned about variables. We know in a variable we can store a value, for example, int num=10; Here num is variable of int type in which we can store an integer value. but suppose you want to store 100 values. It means you should

Arrays in Java Read More »

Comments in Java

In this tutorial, we will learn about Comments in Java. Comments are not used to perform any function in the program but they are really useful for developers. Developers can write comments with variables and Methods to remember their working (purpose) in the program. One important thing to mention comments doesn’t put any impact on the

Comments in Java Read More »

Constructor in Java

In this tutorial, we will learn about Constructor in Java. The constructor looks exactly the same as a normal method but there is some difference between constructor and method check these: The contractor has no explicit return type Name of constructor would same as class name We can not make a constructor abstract, static, final, and

Constructor in Java Read More »

Scroll to Top