gudii9
asked on
Use interfaces only to define types
Use interfaces only to define types
I was reading above staemtent. I have not understood the statement, concept behind clearly.
Please advise. Any ideas, sugestions, sample code, links, resources highly appreciated. thanks in advance
ASKER
>>use interfaces to define types
which types you mean. please advise
which types you mean. please advise
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
>>
means types you define in your application
eg.
public interface Person {
..
you mean object instance variable types like
public interface Person {
Address a;
Contact c;
..
please advise
means types you define in your application
eg.
public interface Person {
..
you mean object instance variable types like
public interface Person {
Address a;
Contact c;
..
please advise
eg. this is bad
public interface Constants {
public static final int A = 5;
public static final int B = 6;
public static final int C = 7;
}