Assignment Statement | Sololearn: Learn to code for FREE!


Assignment Statement

Is the assignment statement collecting new data by building off of the old data that was initialized. I don’t really have to declare an Int multiple times for a method , I can do it once, but the method has to be the same for all?

8/25/2018 1:28:25 AM


3 Answers

New Answer


Are you talking about difference between variables and functions?


When working with variables, any assignment completely replaces the information that was in the variable previously. In general the type of the variable will stay the same when changing the information it contains (a string will still be a string, a number will still be a number); however you can convert the variable between types if necessary. You can check out this link to learn more:


I’m confused. Could you give an example of what you want to do?