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

Last change on this file was 1389, checked in by bird, 21 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: 446 bytes
Line 
1public class emptystring
2{
3 public static void main(String[] args)
4 {
5 System.out.println("null".equals(n(0) + ""));
6 System.out.println("null".equals("" + n(0)));
7 System.out.println("x".equals(n(1) + ""));
8 System.out.println("x".equals("" + n(1)));
9 }
10
11 static String n(int i)
12 {
13 if (i==0) return null; else return "x";
14 }
15}
Note: See TracBrowser for help on using the repository browser.