OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [stringconst2.java] - Blame information for rev 765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 765 jeremybenn
// Test to make sure a string constant is correctly initialized.
2
 
3
import java.lang.reflect.*;
4
 
5
public class stringconst2
6
{
7
  public static final String q = "zardoz";
8
 
9
  public static void main (String[] args)
10
  {
11
    try
12
      {
13
        Class k = Class.forName ("stringconst2");
14
        Field f = k.getField ("q");
15
        System.out.println (f.get (null));
16
      }
17
    catch (Throwable t)
18
      {
19
        t.printStackTrace();
20
      }
21
  }
22
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.