public class pozneg { public void prog( String args[] ) { int x; try { x = Integer.parseInt( args[0] ); } catch( NumberFormatException ex ) { System.out.println( args[0]+" nem kiertekelheto" ); return; } if( x < 0 ) System.out.println( x+" negativ" ); else if( x == 0 ) System.out.println( "Nulla" ); else System.out.println( x+" pozitiv" ); } public static void main( String args[] ) { pozneg e = new pozneg(); e.prog( args ); } }