bamdmux
08/30/2016, 10:10 AMdata class Player(val name: String, var goals: Int) in a football score tracker app. You can declare a val myPlayer = getPlayer("name") and you could add the goals scored myPlayer.goals++ so the object is mutable. But you can't reassign another player to that variable, if you want to track another player, you must define another variable. Makes more sense this way?