I started learning Java Agent few days ago. But documentation is not very good and beginners like me struggling to understand the basics. I created a basic multiplier class and export it to runnable jar using eclipse. Here is the code snippet.

**Main jar file:**

```
public class Multiplier {

    public static void main(String[] args) {
        int x = 10;
            int y = 25;
            int z = x * y;

            System.out.println("Multiply of x*y = " + z);
    }
}

```

[Bytecode for above class](https://i.stack.imgur.com/WPD1v.png)

Now I want to manipulate the value of x from an agent. I tried to create the Agent class like this

**Agent:**

```
package myagent;

import org.objectweb.asm.*;
import java.lang.instrument.*;

public class Agent {

    public static void premain(final String agentArg, final Instrumentation inst) {
        System.out.println("Agent Started");        
        int x_modified = 5;

        //Now How to push the new value (x_modified) to the multiplier class? 
        //I know I have to use ASM but can't figure it out how to do it.
        //Result should be 125

    }

}

```

**My Question**

How do I set the value of x from agent class to multiplier class using ASM?
Result should be 125.