information of code breaking through
<p>I have made a project for school, but there is a part not working and I don't know why.</p>

<p>The problem is, that the information you put in yourself, which is saved under newchamp, ALSO shows itself under Caitlyn.</p>

<pre><code>import javax.swing.JOptionPane;

public class test {

    public String Champion;
    public static String Level;
    public static String Type;

    public static void main(String[] args) {

        test caitlyn;
        test warwick;
        test teemo;
        test olaf;
        test ashe;
        test newchamp;

        //data Champions


        caitlyn = new test();
        caitlyn.Champion = "Caitlyn";
        caitlyn.Level = "15";
        caitlyn.Type = "Ranged";

        warwick = new test();
        warwick.Champion = "Warwick";
        warwick.Level = "18";
        warwick.Type = "Melee";

        teemo = new test();
        teemo.Champion = "Teemo";
        teemo.Level = "17";
        teemo.Type = "Ranged";

        olaf = new test();
        olaf.Champion = "Olaf";
        olaf.Level = "10";
        olaf.Type = "Melee";

        ashe = new test();
        ashe.Champion = "Ashe";
        ashe.Level = "5";
        ashe.Type = "Ranged";

        //verhaal

        newchamp = new test();
        newchamp.Champion = JOptionPane.showInputDialog(null, "Who do you summon as your champion?", "Champion selection", JOptionPane.PLAIN_MESSAGE);;

        newchamp.Level = JOptionPane.showInputDialog(null,"What level is your summoner? 1-18 only", "Level", JOptionPane.PLAIN_MESSAGE);
        newchamp.Type = JOptionPane.showInputDialog(null, "What type of champion have you summoned? (melee or ranged)", "Type", JOptionPane.PLAIN_MESSAGE);
        if (Type.equalsIgnoreCase("melee")) {
            JOptionPane.showMessageDialog(null,"You have now confirmed your champion, you can not edit anything from this point on.");
        }
        else if (Type.equalsIgnoreCase("ranged")) {
            JOptionPane.showMessageDialog(null,"You have now confirmed your champion, you can not edit anything from this point on.");
        }
        else {
            JOptionPane.showMessageDialog(null,"You can only choose Melee or Ranged!");
            newchamp.Type = JOptionPane.showInputDialog(null, "What type of champion have you summoned? (Melee or Ranged)", "Type", JOptionPane.PLAIN_MESSAGE);
            JOptionPane.showMessageDialog(null,"You have now confirmed your champion, you can not edit anything from this point on.");
        }

        JOptionPane.showMessageDialog(null, "You are using the following Champion:"  + newchamp.Champion + " " + "\n Your level is: " +
                newchamp.Level + "\n Your champion is a: " + " " + newchamp.Type + "-champion"
                );

        JOptionPane.showMessageDialog(null, "You will be fighting against the following champion:" + " " + caitlyn.Champion + "  " + "\n She is level" + "  " + caitlyn.Level + " " + "\n And she is a " + caitlyn.Type + "-Champion");

        JOptionPane.showMessageDialog(null, "You and your opponent have both started with 2000 health.");
        Object[] choices = null;
        Object[] options = { "Criticals", "Pure Damage" };
        JOptionPane.showOptionDialog(null, "What will you be fighting with?", "action",
        JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE,
        null, options, options[0]);
    }
}
</code></pre>
