In android studio, you can dynamically change the name of the class

Class cls = Class.forName("net.artsait.bukv.MyClass"); 

Is there anything under the name to change dynamically the names of the data model

For example there is

 Contact contact; 

And instead of Contact different value was substituted depending on the situation.

  • Is it possible that you wrote in the first part of the message, and that in the second one is not the same thing? - post_zeew
  • I cut it. In the first one I wrote about Class, but later I realized that this was not what was needed. Maybe someone come in handy so did not delete. - Artsait
  • Simply declare Object contact , and you can write anything into it - Vladyslav Matviienko
  • ??? can be a little more detail. I have values ​​in String ss = "r"; Is it possible instead of Contact contact; write r contact? - Artsait
  • Do you have a value that you want to write there? - Vladyslav Matviienko

0