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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [stringconst2.java] - Rev 765

Compare with Previous | Blame | View Log

// Test to make sure a string constant is correctly initialized.
 
import java.lang.reflect.*;
 
public class stringconst2
{
  public static final String q = "zardoz";
 
  public static void main (String[] args)
  {
    try
      {
	Class k = Class.forName ("stringconst2");
	Field f = k.getField ("q");
	System.out.println (f.get (null));
      }
    catch (Throwable t)
      {
	t.printStackTrace();
      }
  }
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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