Have a close look at the following code snippets and identify the correct option
trait DeductTax {
def taxCalculation1()
def taxCalculation2() = { println("version1") }
}
class SalaryUtil() extends DeductTax {
override def taxCalculation1() = { println("given implementation") } //line1
override def taxCalculation2() = { println("version2") } //line2
}
"override" keyword is optional at line1
"override" keyword is optional at line2
"override" keyword is optional at both line1 and line2
"override" keyword is neither optional at line1 nor at line2
To get all Infosys Certified Scala Programmer Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee