0

From online sources like tutorial point I came to know that way to define a method and function is same using "def " .From other sources I came to know a function can be defined using " val or var ". What is real difference between method and function and how to define it ? What are properties of mehod and function??

  • 1
    Ugh, hate when this happens, had several paragraphs written out. – Ryan Leach May 07 '18 at 07:22
  • @RyanTheLeach I agree with you. Is SO would allow answers already started when the question is closed to be written out, it would improve a lot. Let the community decide whether an answer to a duplicate question is correct instead of a protocol, which was obsiously not thought well out. – Lajos Arpad May 07 '18 at 07:43
  • Yupp you are right @Lajos arpad. – user9715375 May 07 '18 at 07:51
  • Please don't mark questions as duplicate it can hamper good writer from writing good ans and someone may also add some good points to ans .so plss don't do it sir ... – user9715375 May 07 '18 at 07:57
  • 1
    Marking questions as duplicate is an important way that Stack Overflow improves Search Engine Optimization for people looking for similar problems, the linked issue explained the issue better then I could, I'm just annoyed the work was for nothing. Would rather have had it at least posted, as sometimes the authoritative Question and Answer can read a little too high level for people to understand. If it was worth posting I could have always added another answer on the existing question. – Ryan Leach May 07 '18 at 08:00
  • 1
    Marking a question a duplicate is a legitimate way of telling people that the question was already raised and answered before. The problem is that although you may find the answer you need in the original question, some people who were not aware of the question being duplicate already started answering and allocated time to do a work for free. And then SO does not let them finish it, making the allocated time a complete waste of time for them. – Lajos Arpad May 07 '18 at 08:32

0 Answers0