Eclipse giving me a warning saying

<p>Code:</p><pre><br /><code> p.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e)<br /> {<br /><br /> System.out.println("Welcome to Guess the number Game");<br /> System.out.println("You have 3 chances to guess a number between 0 and 10 excluding 10");<br /><br /> ne.remove(p);<br /><br /> //ne.removeAll();<br /> ne.revalidate();<br /> ne.repaint();}<br /> public void cam()<br /> {<br /><br /> gamer2 game=new gamer2();<br /> game.generatenum();<br /> }<br /> }<br /><br /> ); <br /></code><br /></pre><p><code>p</code> is a JButton.</p><p>Eclipse is giving me a warning saying:"The method cam() from the type new ActionListener(){} is never used locally.</p><p>Why is it giving that warning?</p><br /><h2>Click here view more answers <a href="%20http://stackoverflow.com/questions/34525386/eclipse-giving-me-a-warning-saying">http://ift.tt/1QXlgDf</a></h2>

Nhận xét

Bài đăng phổ biến từ blog này

Align div to bottom of the page in bootstrap

Align elements inside an tag vertically

Javascript is unable to stop page loading