mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-12 09:44:57 +08:00
22 lines
391 B
Java
22 lines
391 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 _)
|
||
|
{
|
||
|
}
|
||
|
}
|
||
|
}
|