I’ve started learning Scala two months ago and I can’t get back to Murakami’s 1Q84 so exciting it is. In the coming series I’d like to share my excitement with you. It won’t be yet another step-by-step tutorial. I’ll share features that made me think (IBM should be proud of me). For whatever reason.
val i = 1 + 2
… is equal to …
val i = (1).+(2)
Scala doesn’t have operators. It has methods with names like
+, -, *, / instead. The code above invokes method named “
+” on the object
Int representing number 1 passing Int object of value 2 as an argument.
Note that you don’t have to type “.” to ivoke a method on an object and also you don’t need to provide parentheses around method arguments. This knowledge helps a lot when trying to understand what is a program written in Scala actually doing.
Author David Gassner explores Java SE (Standard Edition), the language used to build mobile apps for Android devices, enterprise server applications, and more!
The course demonstrates how to install both Java and the Eclipse IDE and dives into the particulars of programming. The course also explains the fundamentals of Java, from creating simple variables, assigning values, and declaring methods to working with strings, arrays, and subclasses; reading and writing to text files; and implementing object oriented programming concepts. Exercise files are included with the course.