transient keyword in java

The “transient” keyword can be applied to member variables of a class to indicate that the member variable should not be serialized when the containing class instance is serialized. So transient fields will not be persisted when the object is serialized. class InterestExample{     int principle;     int rateOfInterest;     int time; […]

Share this article on

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
< Previous Next >