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

Correct Option - a

To get all Infosys Certified Scala Programmer Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in