4 Replies Latest reply on Aug 27, 2010 11:51 AM by 791266

    How to change value of instance variable and local variable at run time?

      As we can change value at run time using debug mode of Eclipse. I want to do this by using a standalone prgram from where I can change the value of a variable at runtime.

      Suppose I have a class, say employee like -

      class employee {

      public String name;

      employee(String name){
      this.name = name;
      public int showSalary(){
      int salary = 10000;
      return salary;
      public String showName()
      return name;

      i want to change the value of instance variable "name" and local variable "salary" from a stand alone program?
      My standalone program will not use employee class; i mean not creating any instance or extending it. This is being used by any other calss in project.

      Can someone tell me how to change these value?

      Please help

      Sujeet Sharma