Displaying all substrings of some given string
The variable names offset, current, and ending could be better.  offset seems to be distance from the end, and current acts as a starting index, so the names should reflect that.

The loop logic is cryptic.  There is a current = 0; offset++; that "resets" the loop, so it would be more clearly written with nested for loops instead.

If you do it right, you shouldn't need to check !result.equals("").  If you did need to check, then it would be better written as !result.isEmpty().

private static void displayAllCombinations(String text) {
    for (int end = text.length(); end &gt; 0; end--) {
        for (int start = 0; start &lt; end; start++) {
            System.out.println(text.substring(start, end));
        }
    }
}