inner_interface.out: New file.

2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* libjava.lang/inner_interface.out: New file.
	* libjava.lang/inner_interface.java: New file.
	* libjava.lang/final_int.out: New file.
	* libjava.lang/final_int.java: New file.
	* libjava.lang/final_static_and_friend.out: New file.
	* libjava.lang/final_static_and_friend.java: New file.

From-SVN: r31944
This commit is contained in:
Alexandre Petit-Bianco 2000-02-12 18:34:50 +00:00 committed by Tom Tromey
parent d5bf38e1d3
commit e35b951f52
7 changed files with 80 additions and 0 deletions

View file

@ -0,0 +1,22 @@
// Class final_int
// Generated on Sat Feb 12 01:27:46 PST 2000
class final_int {
final int x = 30;
class foo {
int bar () {
return x;
}
}
void bar () {
int x = this.new foo ().bar ();
System.out.println (x);
}
public static void main (String[] arg)
{
System.out.println ("Testing class `final_int'...");
new final_int().bar ();
}
}

View file

@ -0,0 +1,2 @@
Testing class `final_int'...
30

View file

@ -0,0 +1,17 @@
// Class final_static_and_friend
// Generated on Sat Feb 12 01:58:38 PST 2000
class final_static_and_friend {
final int a = 34;
static int b = 34;
int c = 34;
void foo ()
{
System.out.println (a+b+c);
}
public static void main (String[] arg)
{
new final_static_and_friend ().foo ();
}
}

View file

@ -0,0 +1 @@
102

View file

@ -0,0 +1,27 @@
// Class inner_interface
// Generated on Fri Feb 11 16:29:04 PST 2000
// Simple inner interface example.
class inner_interface {
interface bar {
static final int field = 14022000;
public void inner_interface ();
}
class baz implements inner_interface.bar {
public void inner_interface ()
{
System.out.println ("This is baz.inner_interface "+field);
}
}
void x () {
this.new baz ().inner_interface ();
}
public static void main (String[] arg)
{
System.out.println ("Testing class `inner_interface'...");
new inner_interface ().x();
}
}

View file

@ -0,0 +1,2 @@
Testing class `inner_interface'...
This is baz.inner_interface 14022000