All pastes #952469 Raw Edit

Mine

public java v1 · immutable
#952469 ·published 2008-03-22 05:09 UTC
rendered paste body
import java.awt.*;import javax.swing.*;import java.util.*;import java.lang.String.*;public class Problem230{	public static void main (String args[])	{		JOptionPane prompt = new JOptionPane();				String input="";		/* we willl use a boolean var to determine if the input is valid		or not */		boolean valid = false;		/* while the input is not exactly 5 chars, keep asking */				while (!valid)		{			input = prompt.showInputDialog(null,"Whats the number to dissect, Chief?");     			/* unless the input is exactly 5 chars, we keep looping */			if (input.length()==5)				valid = true;			else				prompt.showMessageDialog(null,"Error: input length != 5.");		}				String[] output= new String[input.length()];					prompt.showMessageDialog(null,"your number is "+input+", is it not?");		for (int i=0; i<input.length(); i++)		{			output[i] = input.charAt(i)+"   ";			System.out.print(output[i]);		}				System.out.println();		System.exit(0);	}}