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

Scala example source code file (protected-constructors.scala)

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

bar1, bar1, bar2, bar3, ding, foo1, foo1, foo2, foo2, foo3, p, string, string

The Scala protected-constructors.scala source code

package dingus {
  class Foo1() { protected def this(name: String) = this() }
  class Foo2 protected (name: String) { }
  object Ding {
    protected class Foo3(name: String) { }
  }
}

package hungus {
  import dingus._
  
  object P {
    class Bar1 extends Foo1("abc")
    class Bar2 extends Foo2("abc")
    class Bar3 extends Ding.Foo3("abc")

    val foo1 = new Foo1("abc")
    val foo2 = new Foo2("abc")
    val foo3 = new Ding.Foo3("abc")
  }
}

Other Scala examples (source code examples)

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