GeeCON Prague 2014*
The moose likes Beginning Java and the fly likes I need Help With an Interface...plz Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "I need Help With an Interface...plz" Watch "I need Help With an Interface...plz" New topic
Author

I need Help With an Interface...plz

Josh Tambini
Greenhorn

Joined: Nov 30, 2004
Posts: 24
ok this is my mainclass


im having probleam with this interface:


to call the method "TurnOff()" From this Class:


when i tried to call the "TurnOff()" method directly from the main class like this.
SortClass ff = new SortClass(some);
ff.TurnOff();
it worked! but with the interface it doesnt..
anyidea???
p.s: i also tried this "IOff ISort =new SortClass();" instead of this "IOff ISort =(IOff)SortClass();" still didnt worked

[ December 11, 2004: Message edited by: Josh Tambini ]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

"It doesn't work" is very vague. Do you get errors when you compile the program, or when you run it? In either case what exactly is the wording of the error message? Finally, if either the compile-time or runtime errors include a line number, indicate that specific line in your source code with a comment.


[Jess in Action][AskingGoodQuestions]
Josh Tambini
Greenhorn

Joined: Nov 30, 2004
Posts: 24
Originally posted by Ernest Friedman-Hill:
"It doesn't work" is very vague. Do you get errors when you compile the program, or when you run it? In either case what exactly is the wording of the error message? Finally, if either the compile-time or runtime errors include a line number, indicate that specific line in your source code with a comment.


i dont get any errors....neighter compile time errors nor run time erros.
the variable dosnt change to false tough....


any idea why?
 
GeeCON Prague 2014
 
subject: I need Help With an Interface...plz