Question: Sometime when we declare and initialize a variable, say we have an `int i =10;` then after some code this variable would be modified like this code bellow

```
public class reset {
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        int i = 10;
        int co = 1;
        while (co < 10) {
            i++;
            System.out.println(i + "*" + co + "=" + i * co);
            if (i == 99) {
                i = 11; //line 11
                co++;
            }
        }
    }
}

```

then at some point (here at line 11) we need to re-initialize then variable, wouldn't it be nice if we had any language feature doing it automatically instead for example 

```
reset:i

```

I think it's very beneficial for productivity, isn't it?

Answer: 
The initializer line

```
int i = 10;

```

simply creates byte code instructions to assign the value 10 to the variable. That assignment is no different than any other assignment.

To implement reset, there would need to be an extra bit of metadata kept for each variable to say what the special, initial value is.. That metadata is not currently kept in the symbol table, since there is no concept in Java for a 'initial value'. The additional overhead would trade off against the utility of the reset command.

Might be a good idea, but you can get the same thing by just declaring a constant, and reassigning to the constant.
If you want to use the current Java language to do what you want to do, then simply provide a function in each class that you want to perform a "reset" like:

```
private void reset() {
    var = xxx;
    var2 = yyy;
    ...
}

```