How to return class objects?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Prashant_Jangame
Posted On:   Friday, June 8, 2001 02:44 AM

I have created two interfaces and in second interface i am trying to return first interface object, but it is giving me error can't resolve the first interface one object. //This is the first interface //One.java package Test public interface One{ public void somemethod(){ } } //This is the second interface //Two.java package Test public interface Two{ One callingOne(){ } } Here when i compile the second file it is giving me error can't resolve symbol : class One Can anybody help me? Thanks in advance. Regards, Prashant.    More>>

I have created two interfaces and in second interface i am trying to return first interface object, but it is giving me error can't resolve the first interface one object.

//This is the first interface
//One.java
package Test
public interface One{
public void somemethod(){
}
}

//This is the second interface
//Two.java
package Test
public interface Two{
One callingOne(){
}
}

Here when i compile the second file it is giving me error can't resolve symbol : class One

Can anybody help me?
Thanks in advance.

Regards,

Prashant.

   <<Less

Re: How to return class objects?

Posted By:   Ionel_Condor  
Posted On:   Monday, June 11, 2001 08:46 AM

You should not provide implemetation of the methods here, remember that the purpose of an interface is just to define the behaviour at an abstract level, NOT to implement it.
Than you should write implementation classes that will do your tasks (by implementing there the methods from your interfaces).
For complex issues related to clas objects you should read the Class class or the Reflection API.
About | Sitemap | Contact