I finally got it in order for smooth compilation, but nothing gets converted
import java.util.Scanner;
public class nizadi_Lab8
{
public static void main(String[] args)
{
if(args.length > 0)
{
try
{
Integer.parseInt(args[0]);
}
catch(NumberFormatException f)
{
System.out.println("wrong format");
}
}
else
{
System.out.println("no arg");
}
}
public int printBin(int n)
{
args[0] = n;
if(n < 1)
{
}
else
{
System.out.println(printBin(n/2));
System.out.println(printBin(n%2));
}
return n%2;
}
}