[JAVA] problème avec 'showInPutDialog'

Je ne comprends pas j'ai ça:
nom = JOptionPane.showInputDialog("Entrez votre nom") ;

où nom est déclaré en tant qu'attribut de ma classe en String, quand je l'affiche j'ai ça: Joueur@633e5e.

Je ne comprends pas pourquoi?
Si quelqu'un a une idée...

2 réponses

  1. Bizarre... quand j'essaie ceci ça fonctionne.

    package joption;
    import javax.swing.*;

    public class JOptionTester {
    private String nom;

    public JOptionTester() {
    }

    public void test(){
    nom = JOptionPane.showInputDialog("Entrez votre nom") ;
    System.out.println("Entrée: " + nom);
    }

    public static void main(String args[]) {
    JOptionTester tester = new JOptionTester();
    tester.test();
    }
    }

    ???
    0
    1. Modérateur
      vraiment bizarre en effet

      bonané hacky !!!!

      Choubanimal : 
      "Le poilu poilant au poil"
      0