void keyword in java

The “void” keyword can be used as the return type of a method to indicate that the method does not return a value. Example:  public class Employee  {       public void greeting(String name);       {             System.out.println("Welcome to "+name);              // […]

Share this article on

volatile keyword in java

The “volatile” keyword can be used to indicate that, a member variable that can be modified asynchronously by more than one thread. In other words, When a volatile variable is accessed concurrently by multiple threads, its value is updated consistently among all the threads and hence all the threads share the same value for volatile […]

Share this article on
< Previous Next >