There are few issues in your code.
1. you don't need two scanner instance to read two ints. Remove second scanner instance (bn)
2. you need to store values read in the variables
int i = bv.nextInt()
int j = bv.nextInt()
3. pass the values i,j to your maxc function
currently what is happening is
say you enter two nos 7 10
System.out.println("your first enter:"+bv.nextInt()); will consume that input (7), you are left with 10. Next call to nextInt will consume 10
you are trying to read two new values, since there is nothing to read you get exception.
If you trying to run your code sololearn then at input prompt enter both no at same time as sololearn doesn't support interactive sessions.
"I just love coding and determined to be a better coder in the futher,now I am a student and learning programm"
I respect the fact that you gave it a shot, tried to figure it out, didn't give up, and then came here to ask for "help".
You didn't ask for the fix (although you got it) like I've seen a few time. Getting the fix with out understanding why the fix fixes the issue would be useless... Unless, of course, the problem was for your homework or something.
I've always said that the best way to learn is to mess up. Often than not, I end up learning more on the topic than just what's needed to solve the problem because I end up playing with the solution a few different ways and end up learning something else about it.
Anyways, Good luck
the problem is that you the second scanner is throwing an exception since everything the user enters has already been „consumed“ by the first scanner...
your second scanner instance doesnt receive the user input and therefor the call to next.int() causes an exception since there is no int in scanner 2