Literals/Integer: Difference between revisions
Content deleted Content added
added haskell |
added java |
||
Line 63: | Line 63: | ||
True |
True |
||
</lang> |
</lang> |
||
=={{header|Java}}== |
|||
Leading 0 means octal, 0x or 0X means hexadecimal. Otherwise, it is just decimal. |
|||
<lang java> |
|||
public class IntegerLiterals { |
|||
public static void main(String[] args) { |
|||
System.out.println( 727 == 0x2d7 && |
|||
727 == 01327 ); |
|||
} |
|||
}</lang> |
|||
Java has no way of specifying integers in binary |
|||
=={{header|OCaml}}== |
=={{header|OCaml}}== |