Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: [JAVA] Use of declaring method abstract in a interface

Tamas Szabo

2007-03-21

Replies:

Hi,

There is no difference.
All methods of an interface are abstract and public by default.

So, you could even type:

interface Test {
void test();
}

and it will have the same exact effect as your examples.

Tamas



On 3/22/07, temp temp <miroconnect@(protected):
> What is the advantage of declaring method abstract in a intreface ?
>  for example
>  difference between
>  Intreface Test
>  {
>     public void test();
>  }
>
>  and
>
>  Intreface Test
>   {
>      public abstract void test();
>   }
>
>  Thanks & Regards
>  Sairam
>
>
>
> ---------------------------------
> No need to miss a message. Get email on-the-go
> with Yahoo! Mail for Mobile. Get started.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.