On another class i have this :
ekte spiriopoulos wrote:On another class i have this :
userinput class it is ok I know that when we have void we cant return something but a friend gave me this code ,so its false?It cant be ''if(key_am<f[mid].getName())'' as i have it on line 8, right?Henry Wong wrote:
ekte spiriopoulos wrote:On another class i have this :
This class does not compile, and additionally, doesn't really make sense. First, the "Name" variable, has not been declared. Second, the return call of the getName() method won't work, as it is declared as not returning anything (void) at all. Third, how is the UserInput related? Additionally, how is the Koh class related to the Epo class? etc. etc. etc.
In other words, it is probably not really possible to explain something that doesn't work...
Henry
ekte spiriopoulos wrote:userinput class it is ok I know that when we have void we cant return something but a friend gave me this code ,so its false?It cant be ''if(key_am<f[mid].getName())'' as i have it on line 8, right?
Henry Wong wrote:Considering that you got this code from your friend, and you have questions regarding it, perhaps it would be a good idea to ask your friend regarding it?