interface Cricket
{
public void Pitch (String type);
public void Seats (int num);
}
class Arrangement implemets Cricket
{
public void Pitch (String types);
{
System.out.println (types);
}
public void Seats (int nums)
{
System.out.println (nums);
}
}
public Class Match
{
public static void main (String arg)
{
Arrangement arg = new Arrangement ();
arg.Pitch ("fast");
arg.Seats (4000);
}
}
qadeer37 0 Newbie Poster
Recommended Answers
Jump to PostWelcome qadeer37,
Please read the rules before posting. http://www.daniweb.com/forums/faq.php?faq=daniweb_policies
>What's wrong?
Have a look at signature of main(String arg),
public static void main(String arg[])
Jump to PostApart from the mistake mentioned by the adatapost, here's another:
public void Pitch (String types);
that appears to be a method without definition, remove the semicolon at the end of the line.
Jump to PostApart from the mistake mentioned by the adatapost, here's another:
public void Pitch (String types);
that appears to be a method without definition, remove the semicolon at the end of the line.
ehm... why? it's an interface, so that code is correct
All 11 Replies
kvprajapati 1,826 Posting Genius Team Colleague
verruckt24 438 Posting Shark
kvprajapati commented: Thanks! +6
stultuske 1,116 Posting Maven Featured Poster
kvprajapati 1,826 Posting Genius Team Colleague
verruckt24 438 Posting Shark
musthafa.aj 6 Posting Whiz
verruckt24 438 Posting Shark
musthafa.aj 6 Posting Whiz
BestJewSinceJC 700 Posting Maven
verruckt24 438 Posting Shark
stultuske 1,116 Posting Maven Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.