Finding the length of the largest run
The maxCheck variable is unused.  You also don't need the str.length() == 1 special case.

The whitespace around the else is unconventional.

The efficiency is fine.  Your algorithm, like any reasonable algorithm for this problem, is O(L), where L is the length of the input string.  You could try to squeeze out a small performance improvement, but it's almost certainly not worth it.

For a simple function like this, I don't think you need code comments.  However, a JavaDoc comment would always be useful.

The code works equally well on any CharSequence, not just a String, and should therefore be generalized.

/**
 * Finds the length of the longest run of identical characters.
 */
public static int maxRun(CharSequence seq) {
    if (seq.length() == 0) { return 0; }

    int maxRun = 1,
        currentRun = 1;

    for (int i = 1; i &lt; seq.length(); i++) {
        if (seq.charAt(i) == seq.charAt(i - 1)) {
            currentRun++;
            if (currentRun &gt; maxRun) { maxRun = currentRun; }
        } else {
            currentRun = 1;
        }
    }
    return maxRun;
}


The tests that you wrote are fine for a beginner, but the de facto standard for Java is to use junit.