Local variable:
import [Link].*;
class Localvariable {
public static void main(String[] args)
{
// Declared a Local Variable
int var = 10;
// This variable is local to this main method only
[Link]("Local Variable: " + var);
Output:
Local Variable: 10
static in simple words:
When a method is static, it belongs to the class, not to an object made from the class.
You can call a static method without creating an object.
(Or)
String[] args in simple words:
String[] args means "an array of strings called args."
Instance variable: