In java when I was working on Netbeans Ide I saw method of nextInt(int radix). I tried to implement this and passed an integer number, but that gave an exception of InputMismatchException. My code is as follows:
import java.util.*;
import java.lang.*;
public class HelloWorld{
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt(2);
System.out.println(n);
}
I want know that what is radix argument? Also,what is its use?