Object Sheet1 (Println ("Welcome To The Scala Worsheet) Val Answer 8 5 2 Answer 0.5 ("Hello, " + Answer) .Tolowercase)
This Scala code defines an object that first prints a welcome message. It then calculates the value of 8 * 5 * 2 and stores it in the variable "answer". Finally, it takes half of the value of "answer" and concatenates the string "Hello," with the lowered case value of "answer".
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
23 views1 page
Object Sheet1 (Println ("Welcome To The Scala Worsheet) Val Answer 8 5 2 Answer 0.5 ("Hello, " + Answer) .Tolowercase)
This Scala code defines an object that first prints a welcome message. It then calculates the value of 8 * 5 * 2 and stores it in the variable "answer". Finally, it takes half of the value of "answer" and concatenates the string "Hello," with the lowered case value of "answer".