source: trunk/gcc/libjava/testsuite/libjava.lang/Float_1.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: 991 bytes
Line 
1/*
2
3Date: 25 Aug 1998 16:04:00 -0000
4From: Andrew Haley <aph@pasanda.cygnus.co.uk>
5To: java-project@cygnus.com
6Subject: Help: vtable problem?
7
8My little program:
9
10-----------------------------------------------------------------------
11import java.lang.*;
12
13 public class widget
14 {
15 public static void main (String argv[])
16 {
17 int test = Float.floatToIntBits((float)2.0);
18 String s = Integer.toHexString(test);
19
20 System.out.print (s+"\n");
21 }
22
23 }
24-----------------------------------------------------------------------
25prints out
26
2740000000
28
29with Sun's interpreter, but prints out
30
31true
32
33when compiled with gcj; PrintStream dispatches a string arg as a
34boolean rather than as a String. I've tried to rebuild everything.
35
36?
37
38Thanks,
39Andrew.
40
41*/
42
43public class Float_1
44{
45 public static void main (String argv[])
46 {
47 int test = Float.floatToIntBits((float)2.0);
48 String s = Integer.toHexString(test);
49
50 System.out.print (s+"\n");
51 }
52}
Note: See TracBrowser for help on using the repository browser.