diff options
author | michelou <michelou@epfl.ch> | 2005-11-30 18:15:47 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2005-11-30 18:15:47 +0000 |
commit | 47d41ea48da79074bbe6e176f26cabafc6a0ace9 (patch) | |
tree | 8419225430e426bad3bedbd06547bca43353e517 /test-nsc/files/jvm/JavaInteraction.scala | |
parent | 89c583a548bfa2c113cb5bff5668895107bee70e (diff) | |
download | scala-47d41ea48da79074bbe6e176f26cabafc6a0ace9.tar.gz scala-47d41ea48da79074bbe6e176f26cabafc6a0ace9.tar.bz2 scala-47d41ea48da79074bbe6e176f26cabafc6a0ace9.zip |
*** empty log message ***
Diffstat (limited to 'test-nsc/files/jvm/JavaInteraction.scala')
-rw-r--r-- | test-nsc/files/jvm/JavaInteraction.scala | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test-nsc/files/jvm/JavaInteraction.scala b/test-nsc/files/jvm/JavaInteraction.scala new file mode 100644 index 0000000000..ee86e83dbd --- /dev/null +++ b/test-nsc/files/jvm/JavaInteraction.scala @@ -0,0 +1,24 @@ +//############################################################################ +// Test Java interaction +//############################################################################ +// $Id$ + +import java.awt.Color; +import java.awt.Point; + +class ColoredPoint(x: Int, y: Int, c_ : Color) extends Point(x, y) { + val c: Color = c_; + def getC(): Color = c; +} + +object Test { + def main(args: Array[String]): Unit = { + val p = new ColoredPoint(5, 7, Color.RED); + System.out.println("p.x = " + p.x); + System.out.println("p.c = " + p.c); + System.out.println("p.getX() = " + p.getX()); + System.out.println("p.getC() = " + p.getC()); + } +} + +//############################################################################ |