Retro68/gcc/libjava/testsuite/libjava.lang/stringconst.java
Wolfgang Thaller aaf905ce07 add gcc 4.70
2012-03-28 01:13:14 +02:00

23 lines
367 B
Java

// A reference to a String shouldn't cause an interface to be
// initialized.
interface I
{
String z = "zardoz";
int q = stringconst.out ("q", 0);
}
public class stringconst
{
public static int out (String s, int i)
{
System.out.println (s + "=" + i);
return i;
}
public static void main (String[] args)
{
System.out.println (I.z);
}
}