/* * File: Powers.java * Author: Stephen Gilmore * Copyright: University of Edinburgh * * Powers.java,v 1.4 2002/10/22 08:59:52 s0239160 Exp */ import java.math.BigInteger; class Powers { public static void main(String[] args) { final BigInteger two = new BigInteger("2"); BigInteger I = new BigInteger("1"); while (true) { I = I.multiply(two); System.out.println(I); } } }