Page 1 of 1

1. For each statement below, determine if it is True or False and discuss why. (a) Scala is a dynamically typed programm

Posted: Fri May 20, 2022 5:22 pm
by answerhappygod
1 For Each Statement Below Determine If It Is True Or False And Discuss Why A Scala Is A Dynamically Typed Programm 1
1 For Each Statement Below Determine If It Is True Or False And Discuss Why A Scala Is A Dynamically Typed Programm 1 (105.01 KiB) Viewed 46 times
1. For each statement below, determine if it is True or False and discuss why. (a) Scala is a dynamically typed programming language (b) Classes in Scala are declared using a syntax close to Java's syntax. However, classes in Scala can have parameters. (c) It is NOT possible to override methods inherited from a super-class in Scala (d) In Scala, when a class inherits from a trait, it implements that trait's interface and inherits all the code contained in the trait. (e) In Scala, the abstract modifier means that the class may have ab- stract members that do not have an implementation. As a result, you cannot instantiate an abstract class. (f) In Scala, a member of a superclass is not inherited if a member with the same name and parameters is already implemented in the subclass. 2. Which is output of the following lines of code in Scala object example1 { class ChecksumAccumulator { var sum = 0 } def main(args: Array [String]) : Unit={ val calc = new ChecksumAccumulator println("calc.sum (" + calc.sum + "]") } } :