Guessing game - am I using the concept of objects in Java properly?
To start with, spot the inconsistency. For the name you create it in your main loop and then use a setter; for the number you have a method in the Player object to acquire the guess. The latter is more in line with the message-passing philosophy of OO. (Many people seem to think that using getters and setters is being OO. They're often - not always - a sign of non-OO thinking). However, it doesn't take it as far as it could. The number guessed isn't a property of the player - it's a property of the guess.

Guessing a number isn't the same thing as displaying it - either rename the method or, probably better - a method should do one thing - move that out.

Next up, the flagWinner is a big red flag. Its sole purpose is to identify one of the objects p1, p2, p3, or none of the above. What's the OO way to do that? Use the object to identify itself.

I'd be inclined to factor out the IO as an object too, to be a bit less procedural. So without going into a full over-patterned architecture we have


public class IO {
    public void output(String msg) {
        JOptionPane.showMessageDialog(null, msg);
    }

    public String input(String prompt) {
        return JOptionPane.showInputDialog(prompt)
    }

    public int inputInt(String prompt) {
        return Integer.parseInt(input(prompt));
    }
}

public class Player {
    private String playerName;

    private Player(String name) {
        playerName = name;
    }

    public static Player createPlayer(IO io, String prompt) {
        String name = io.input("Enter " + prompt + " Name: ");
        return new Player(name);
    }

    public String getPlayerName() {
        return playerName;
    }

    public int guessNumber(IO io) {
        return io.inputInt(playerName +"'s Turn\nGuess the Number"));
    }
}

public class GuessGame {

    private final IO io;
    private final int numPlayers;
    private int numberToGuess;
    private List&lt;Player&gt; players = new LinkedList&lt;Player&gt;();

    public GuessGame(IO io, int numPlayers) {
        this.io = io;
        this.numPlayers = numPlayers;
    }

    public void init() {
        numberToGuess = (int) (Math.random()*10);
        for (int i = 0; i &lt; numPlayers; i++) {
            players.add(Player.createPlayer(io, "Player " + (i+1)));
        }
    }

    public void runGame(){
        init();

        Player winner = null;
        Iterator&lt;Player&gt; it = players.iterator();
        while (winner == null) {
            if (!it.hasNext()) {
                it = players.iterator();
            }

            Player turnPlayer = it.next();
            String playerName = turnPlayer.getPlayerName();

            int guess = turnPlayer.guessNumber(io);
            io.output(playerName+ "'s GUESS is " + number);

            if (guess == numberToGuess) {
                winner = turnPlayer;
            }
            else {
                io.output(playerName + "'s Guess is Wrong!");
            }
        }

        io.output(winner.getPlayerName()+ " Wins!");
    }
}