• About

TwentyMegaHertz

~ Speed is Just a Number

TwentyMegaHertz

Tag Archives: spark

The Java hangover in Scala

05 Friday May 2017

Posted by twentymegahertz in programming

≈ Leave a comment

Tags

java, scala, spark

A couple of weeks ago, I started reading up on the Scala programming language.

Before even referring to a book, I downloaded all the tools, namely the Scala compiler, Eclipse for Scala and IntelliJ IDEA for Scala. The next step was to look for samples on the Internet. Having found a few samples, I copied them and executed them successfully.

Then I decided to try out a simple application on my own.

I defined a class, added the ‘main’ method and a few statements inside ‘main’. I tried executing the application, but was not able to do so. I tried for quite some time, before giving up and picking up a book. It was while reading the book that the penny dropped.

My mistake was simple. I had put the ‘main’ method inside a class. To run the application, the ‘main’ method has to be inside an ‘object’.

Thus, my Java background proved to be a hangover while programming in Scala.

Advertisements

Recent Posts

  • Auto-playing Videos on Websites
  • Tilted Horizon 1
  • Python Pickle – Fragile
  • Same concept, different subject 3
  • Same concept, different subject 2

Archives

  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012

Categories

  • android
  • blurb
  • book
  • browser
  • computing
  • design
  • gadgets
  • general
  • media
  • mobile
  • photography
  • picnic
  • programming
  • securtity
  • software
  • technology
  • travel
  • Uncategorized

Meta

  • Register
  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.com
Advertisements

Create a free website or blog at WordPress.com.