mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-22 19:49:34 +08:00
665bfbb0b4
* libjava.lang/stringconst.out: New file. * libjava.lang/stringconst.java: New file. From-SVN: r34115
23 lines
367 B
Java
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);
|
|
}
|
|
}
|