Core java Archive

Modulo operator in java

In this post, we will see about modulo or modulus operator in java. Modulo operator() is used to find the when one integer is divided by another integer. Modulo operator Syntax We can’t …

Global variables in java

In this post, we will see how to define global variables in java. Unlike C/C++, there are no standard global variables in java but you can still define global variables that can be used across …

Static block in java

In this post, we will see about how to implement static block in java. Here are some important points about static block in java. is used for static initializations of a class Static block …

Get current timestamp in java

In this post, we will see how to get current timestamp in java. There are multiple ways to get current timestamp in java. Using Java 8’s Instant class There are three ways to get timestamp …