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

Scala example source code file (abstract-vars.check)

This example Scala source code file (abstract-vars.check) 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

a, a, fail1, fail1, fail2, fail3, fail4, fail5, int, int, note, note

The Scala abstract-vars.check source code

abstract-vars.scala:5: error: class Fail1 needs to be abstract, since variable x is not defined
(Note that variables need to be initialized to be defined)
class Fail1 extends A {
      ^
abstract-vars.scala:9: error: class Fail2 needs to be abstract, since variable x in class A of type Int is not defined
(Note that variables need to be initialized to be defined)
class Fail2 extends A { }
      ^
abstract-vars.scala:11: error: class Fail3 needs to be abstract, since variable x in class A of type Int is not defined
(Note that an abstract var requires a setter in addition to the getter)
class Fail3 extends A {
      ^
abstract-vars.scala:14: error: class Fail4 needs to be abstract, since variable x in class A of type Int is not defined
(Note that an abstract var requires a setter in addition to the getter)
class Fail4 extends A {
      ^
abstract-vars.scala:18: error: class Fail5 needs to be abstract, since variable x in class A of type Int is not defined
(Note that an abstract var requires a getter in addition to the setter)
class Fail5 extends A {
      ^
5 errors found

Other Scala examples (source code examples)

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