Sometimes, the type of the variable that you want does not match the type of the data that you are going to use to initialize it. In that case, you may need to convert the data as part of the assignment. Here, we use a toLong() function on an Int to get a Long representation of the same value.

You can learn more about this in:
Run Expand Edit