source: trunk/gcc/libjava/testsuite/libjava.lang/stringconst2.java

Last change on this file was 2, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 391 bytes
Line 
1// Test to make sure a string constant is correctly initialized.
2
3import java.lang.reflect.*;
4
5public 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 _)
18 {
19 }
20 }
21}
Note: See TracBrowser for help on using the repository browser.