0

i was trying to explain a friend about interface
i have followed the abstract concept but dont know to how to demonstrate

inteface a
{
void meth(int i){
};
}
class dani implements a
{
public static void main(String args[])
{int i;
public void meth(5);
System.out.print(i);
}
}

if i dont include method meth it should show me an error as per interface rule

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by JamesCherrill
0

Not sure why this is "solved". Code will not compile, and does not illustrate the correct use of an interface even if it did.

0

to be honest i was worried about my reputation after typing the program. i thougt i could put more efforts myself but if you tell me whats wrong in the code and how i demonstrate this to my friend.I am clear with the concept but not sure about coding in java thanks

Edited by mike_2000_17: Fixed formatting

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.