FileDocCategorySizeDatePackage
BinaryDigits.javaAPI DocExample475Sun Feb 08 21:33:56 GMT 2004None

BinaryDigits

public class BinaryDigits extends Object
Template for standalone, line-mode main program.
author
Ian F. Darwin, http://www.darwinsys.com/
version
$Id: BinaryDigits.java,v 1.3 2004/02/09 03:33:56 ian Exp $

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] argv)

		//+
		String bin = "101010";
		System.out.println(bin + " as an integer is " + Integer.valueOf(bin, 2));
		int i = 42;
		System.out.println(i + " as binary digits (bits) is " + 
			Integer.toBinaryString(i));
		//-