Guess the number game
Not a full review, just a couple of points that jumped out at me:


you often assign the value to a variable on the next line after declaring it. Just assign the value on the same line (eg int startRange = nextValidInt(input);).
you can declare a loop variable inside the loop: for (int numberOfTries = 0; numberOfTries &lt;= maxAttemp - 1; numberOfTries++).
if (numberOfTries &gt;= maxAttemp) will always be true, as the for loop increases numberOfTries to maxAttemp. Well, except when you won. I would remove the if and replace the break with a return.
numberOfTries &lt;= maxAttemp - 1 looks better written as numberOfTries &lt; maxAttemp.
the main method shouldn't do anything except start your program. I would move your code to its own function. You might also want to create extra functions for initial info printing/setup gathering and the actual guessing game.