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);
   }
}

Apart 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.

commented: Thanks! +6

Apart 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

There are number of errors. Please accept my apology.

1. Line #8 - implemets

class Arrangement implements Cricket

2. Line #13 - semi-colon at definition of function. Pointed by verruckt24

public void Pitch (String types)
   {
	System.out.println (types);
   }

Line #26 - Class

public class Match{
    .....
}

Line #28 - public static void main (String arg)

public static void main (String arg[])

Line #30 - Arrangement arg - arg is already defined.

Arrangement arg1 = new Arrangement ();
    arg1.Pitch ("fast");
    arg1.Seats (4000);

ehm... why? it's an interface, so that code is correct

Yeah actually adatapost cleared it. I was talking about the code from the class Arrangement to which he had already provided a definition.

What's wrong?

you didn't specified what errors you got while compiling or running..

that is wrong...hi..hi...

What's wrong?

you didn't specified what errors you got while compiling or running..

that is wrong...hi..hi...

If you read all the posts which I do not think you've done, you'll pretty much understand that the problems were compile time, which had been already suggested to him and he might have already been on his way, when you decided to give him a slight tap on his hand for... nothing.

If you read all the posts which I do not think you've done, you'll pretty much understand that the problems were compile time, which had been already suggested to him and he might have already been on his way, when you decided to give him a slight tap on his hand for... nothing.

first i apologies for if i offend anybody...

he posted code snippet ok..he know very well what kind of bugs he had...

that's why i asked him to post code with bugs ..

cause we taking that code and compiling or running it much interrupt somebodies busy schedule that who really want to help him...

i can help him really cause its not look like tough to clear it...

only i request them is if they know errors at which line while compiling or running which we need it for quick response...

otherwise it will be congesting thread replies...

tats all...

cool :cool:

And as verruckt so kindly pointed out, your response was not necessary because all of the issues had already been cleared up. Your mention of needing the bugs to be listed was unnecessary because the problem was already answered without that information.

Firstly those are not "bugs", they are plain errors that won't go past the compiler itself. Secondly if he knew them well which I think he should have then he might have had solved the problem himself. Lastly we aren't here to compile & run his programs thats for him to do.
I agree with the fact that Exception traces and error statements are the least a beginner can do to allow us to solve his problems, but if the errors are just too obvious for us then we don't require the extra information and we could just as well point them the issues directly.

Yeah actually adatapost cleared it. I was talking about the code from the class Arrangement to which he had already provided a definition.

missed that semicolon, my mistake :)

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.