aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.lang/stringconst.java
blob: 628574943178bbca1d3d549ffde64d723503edff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// 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);
  }
}