I was wondering if there is an easy way to declare a variable in android programming. I am still teaching myself however I haven’t been able to find the answer to this question. I would like to do something like:
var1 = 'variable1';
var2 = 'variable2';
So that it can be called later in the code by its Variable.
Thank you in advance.
I suggest learning Java fundamentals first. Declaring a variable is fundamental to Java programming language (and indeed many programming languages), its not just Android specific.
You can learn Java fundamentals here.
Good Luck in your learning