home | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Scala example source code file (Test.java)

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

error, hashmap, j, object, object, outerimpl, outerimpl, s, string, string, test, the, the, x

The Scala Test.java source code

class J { S s ; }

public class Test {
  public static void main(String[] args) {
    final X x = new X();
    final OuterImpl o = new OuterImpl(x);

    final OuterImpl.Inner i1 = o.newInner();
    i1.getT().getI().getT().getI();  // <--- Error: "The method getI() is undefined for the type Object"

    final Outer<X>.Inner i2 = o.newInner();
    i2.getT().getI().getT().getI(); // <--- Error: "The method getI() is undefined for the type Object"

    HashMap<String, String> map = new HashMap();
  }
}

Other Scala examples (source code examples)

Here is a short list of links related to this Scala Test.java source code file:



my book on functional programming

 

new blog posts

 

Copyright 1998-2019 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.