Encapsulation in JAVA

Encapsulation : Sometimes we have to declare some variables with private access specifier, specially variables which stores sensitive values e.g. ID, Name, BankBalance, AccountNumber, etc. So we will keep such variables private, but now no other class can access it or assign value to this private variable. So question arise is “How to assign value … Read more

Static Keyword in JAVA

Static keyword in Java Static is known as a non-access modifier. Static keyword can be used to declare the following. Variables Block Method Static Variables : In easy terms, the static variable is the variable which is common for all the object of that particular class. It can be called with or without object instance … Read more