Made the NimGame class more object oriented. Instead of having all static methods, there is now an implicit constructor and a "startPlaying" metnod. The main class creates an instance fo the NimGame and starts it playing. The advantage of this approach is that now the NimGame can be used elsewhere (outside this class), and you could even have multiple NimGames running simultaneously.
Move the Scanner creation outside of the do loop.
Pull the game state out into a separate NimGameState class. This is an important refactor because it not only makes the code much simpler to read and understand, but now the NimGameState can be independently unit tested.
Look closely at the NimGameState class. It encapsulates all the state information about the game and contains no print statements. All the data is private, and only a minimal set of methods are exposed. Instead of simple setters, the methods correspond to expected game actions and may update multiple proerties. For example pickUpSticks(num) adjusts the number of sticks remaining, advances to the next turn, and returns true if the current player just won.
Also fixed the bug where the game does not terminate if the last move picks up more sticks than remain.
Pull out all the code for playing the Nim game into a separate method.
This makes it easier to read by clearly labelling all the code that relates to playing a single game. The original long method now looks like this:

        System.out.println("JAVA NIM");
        boolean playing;
        do {
            playing = playGame();
        } while (playing);
Test on "won" instead of "!won" in conditional to make code easier to read. Switched the if/else blocks to match.
Create a bunch of unit tests to exercise the NimGameState code and be confident that it works before making additional changes. In the process of adding tests, I found and fixed a bug where the number of sticks could drop below 0.