alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Scala example source code file (repl-bare-expr.scala)

This example Scala source code file (repl-bare-expr.scala) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Scala tags/keywords

bovine, cow, cow, int, list, list, moo, moo, moooooo, repltest, ruminant, test, test

The Scala repl-bare-expr.scala source code

import scala.tools.partest.ReplTest

object Test extends ReplTest {
  def code = """
2 ; 3
{ 2 ; 3 }
5 ; 10 ; case object Cow ; 20 ; class Moo { override def toString = "Moooooo" } ; 30 ; def bippy = {
  1 +
  2 +
  3 } ; bippy+88+11

object Bovine { var x: List[_] = null } ; case class Ruminant(x: Int) ; bippy * bippy * bippy
Bovine.x = List(Ruminant(5), Cow, new Moo)
Bovine.x
  """
}

Other Scala examples (source code examples)

Here is a short list of links related to this Scala repl-bare-expr.scala source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.