Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: what is the different if i add @Override above method and the method without @Override (Spring Project)

  1. #1
    Member
    Join Date
    May 2020
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default what is the different if i add @Override above method and the method without @Override (Spring Project)

    i have a class with implement interface. but i found that sometime there is @Override above before the method. what is usage of @Override?

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,012
    Thanks
    63
    Thanked 2,705 Times in 2,655 Posts

    Default Re: what is the different if i add @Override above method and the method without @Override (Spring Project)

    what is usage of @Override?
    That tells the compiler to check if the method that follows it correctly overrides a method in the extended class or implemented interface.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. @override
    By kevthanewversi in forum What's Wrong With My Code?
    Replies: 2
    Last Post: August 11th, 2013, 04:13 AM
  2. Replies: 0
    Last Post: July 19th, 2012, 09:02 AM
  3. GUI error: is not abstract and does not override abstract method
    By djl1990 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: October 21st, 2011, 01:26 PM
  4. override list add method?
    By ober0330 in forum Collections and Generics
    Replies: 10
    Last Post: July 17th, 2011, 07:34 PM
  5. Override class method
    By mekie in forum What's Wrong With My Code?
    Replies: 4
    Last Post: October 31st, 2010, 07:06 PM