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

Scala example source code file (embeddedBook.scala)

This example Scala source code file (embeddedBook.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

acme, acme, array, array, burak, burak, emir, emir, this

The Scala embeddedBook.scala source code

/* examples/phonebook/embeddedBook.scala */
package phonebook  

object embeddedBook {

  val company  = <a href="http://acme.org">ACME
  val first    = "Burak"
  val last     = "Emir"
  val location = "work"

  val embBook = 
    <phonebook>
      <descr>
        This is the <b>phonebook of the 
        {company} corporation.
      </descr>
      <entry>
        <name>{ first+" "+last } 
        <phone where={ location }>+41 21 693 68 {val x = 60 + 7; x}
      </entry>
    </phonebook>;

  def main(args: Array[String]) =
    Console.println( embBook )

}

Other Scala examples (source code examples)

Here is a short list of links related to this Scala embeddedBook.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.