All pastes #344122 Raw Edit

Unnamed

public java v1 · immutable
·published 2007-02-07 15:24 UTC
rendered paste body
import java.io.File;import java.io.FileInputStream;import java.util.Random;public class FilLeser {	public static void main(String[] args) {		String inn = new String(args[0]);		File fil = new File(inn);				byte[] b = new byte[(int)fil.length()];		try {			FileInputStream fi = new FileInputStream(fil);			fi.read(b);		} catch (Exception e) {}						String innhold = new String(b);		String[] ord = innhold.split(" ");				int rl = ord.length;		Random r = new Random();				System.out.println(ord[r.nextInt(rl)]);	}}