4 Replies Latest reply on Feb 14, 2010 4:55 PM by 807580

    How to create variable name from specified string?

    807580
      I would like to create a variable/object with the name from a provided string. So that later on I can refer to this variable by this name.
      For example,

      private void myFunc(String name){
      MyObject <name> = new MyObject();
      objectOperation( <name> );
      }

      Can anyone please teach me how to do that? Thank you.