453 B
453 B
Expressions & Statements (#2)
Write three functions using expression body syntax:
-
f()
takes twoInt
parameters and returns the sum. -
g()
takes twoString
parameters and returns them, concatenated. -
h()
callsprintln()
to display"h()"
.
In main()
, assign the result of each function to a val
, and specify the
type. Then display on the console the types of all the functions f()
, g()
and h()
, each one on its own line.