Is there an example where the Java code repeatedly executes its own code? [closed]

Tags: ,



Example:

int a = 10; 
System.out.println(a);

How can the value of the variable a be printed again after a restart of the application?

Answer

When you restart the application the variable a is printed out. You restart it 5 times, a will be printed out 5 times + the original first.



Source: stackoverflow