Results 1 to 5 of 5
  1. #1
    alexoffspring is offline Member
    Join Date
    Feb 2011
    Posts
    4
    Rep Power
    0

    Question public @interface ??

    What's the meaning of a 'public @interface'?? :confused:

    for example:
    Java Code:
    public @interface Column {
    	String name() default "";
    }	
     ... used as ... 
    public class User implements Serializable {
    @Column(name="UserName")
    private String username;
    }
    and what's the difference with 'public interface'.. :confused::confused:

  2. #2
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    618
    Rep Power
    4

  3. #3
    alexoffspring is offline Member
    Join Date
    Feb 2011
    Posts
    4
    Rep Power
    0

    Default

    Thanks Petr for the link, but i do not find it clear, since it needs to have a knowledge of what annotation is and what @interface means.

    I am actually asking what these two things are..

  4. #4
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    618
    Rep Power
    4

    Default

    well I think @interface - this such annotation, which realization in your code. It is all.
    Can you show all code or Where you found this code?
    so public interface - this just interface. These are two different things
    Last edited by Petr; 02-15-2011 at 09:01 AM.
    Skype: petrarsentev
    http://TrackStudio.com

  5. #5
    alexoffspring is offline Member
    Join Date
    Feb 2011
    Posts
    4
    Rep Power
    0

    Default

    for those interested, I believe the following link answers the question

    Annotations

Similar Threads

  1. Replies: 1
    Last Post: 12-04-2010, 05:41 PM
  2. Replies: 5
    Last Post: 06-26-2009, 03:03 AM
  3. Replies: 14
    Last Post: 05-28-2009, 05:44 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •