do keyword in Java

The ” do ” keyword specifies a loop whose condition is checked at the end of each iteration. Syntax is as below do  {         <statements>  } while (boolean_condition); do { <statements> } while (boolean_condition); The do-while is a loop structure which repeatedly executes the statements until a condition becomes false. In […]

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