I am from java backgroud and just started studying scala .
I have few doubts.
1. What does scala use functions or methods?
Here it is given that methods are associated with object and functions are not. So java have methods and not functions.
If scala follows the concept of oops then why its called functional language explain it with some code??
2. Difference between functional and non functional language
As i started studying scala i came across "scala is a functional language".Here i get the explanation that functional programming are those which follows first class function means "Functional programming involves writing code that does not change state.". What is the advantage of the code that we cant change?(correct me if i am wrong) .what is the code difference?
It would be very helpful if someone explain me this.
Thanks in advance