gcc/libjava/testsuite/libjava.lang/stringconst2.java
Andreas Tobler c60fe329d5 stringconst2.java: Print a stack trace in case of failure.
2006-04-17  Andreas Tobler  <a.tobler@schweiz.ch>

	* testsuite/libjava.lang/stringconst2.java: Print a stack trace in case
	of failure.

From-SVN: r113011
2006-04-17 23:18:23 +02:00

23 lines
413 B
Java

// 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();
}
}
}