MagicNumber magNumb = new MagicNumber();Code:import java.net.*; import java.io.*; public class GuessNumberHandlerServer { } class GuessNumberHandler extends Thread { }
how can i declare that outside the functions?
so i can use mnumb.whatever (same instance of the magicnumber class) in both the 'public class' and the 'class' function?
what im actually trying to do is create magNumb in this: public class GuessNumberHandlerServer
and i want to use magNumb in the 'GuessNumberHandler extends Thread' please may someone tell me how?




Reply With Quote