![]() |
|
Applets Doubt ?? - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Java, JVM, & JRE (https://sinister.ly/Forum-Java-JVM-JRE) +--- Thread: Applets Doubt ?? (/Thread-Applets-Doubt) |
Applets Doubt ?? - Psycho_Coder - 05-18-2013 I am working on a simple project which I will post here very soon. However I need to know that why some highlights are being shown to me to "Add @override" for the following methods public void start(){ } public void run(){ } Applets Doubt ?? - Psycho_Coder - 05-18-2013 I am working on a simple project which I will post here very soon. However I need to know that why some highlights are being shown to me to "Add @override" for the following methods public void start(){ } public void run(){ } RE: Applets Doubt ?? - Deque - 05-18-2013 Because you override the methods inherited from Applet. The annotation is an information for the programmer as well as for the compiler. If you add @Override to a method that doesn't override anything, the compiler will complain. Other languages like C# have an override modifier instead that serves the same purpose. RE: Applets Doubt ?? - Deque - 05-18-2013 Because you override the methods inherited from Applet. The annotation is an information for the programmer as well as for the compiler. If you add @Override to a method that doesn't override anything, the compiler will complain. Other languages like C# have an override modifier instead that serves the same purpose. RE: Applets Doubt ?? - Psycho_Coder - 05-18-2013 (05-18-2013, 01:21 PM)Deque Wrote: Because you override the methods inherited from Applet. The annotation is an information for the programmer as well as for the compiler. If you add @Override to a method that doesn't override anything, the compiler will complain. Okay I got it and I have done with the little project too. So you can close this thread, my doubts are clear now. http://www.hackcommunity.com/Thread-Java-Game-Pong-Game-implemented-in-Java RE: Applets Doubt ?? - Psycho_Coder - 05-18-2013 (05-18-2013, 01:21 PM)Deque Wrote: Because you override the methods inherited from Applet. The annotation is an information for the programmer as well as for the compiler. If you add @Override to a method that doesn't override anything, the compiler will complain. Okay I got it and I have done with the little project too. So you can close this thread, my doubts are clear now. http://www.hackcommunity.com/Thread-Java-Game-Pong-Game-implemented-in-Java RE: Applets Doubt ?? - Deque - 05-18-2013 -closed as requested- RE: Applets Doubt ?? - Deque - 05-18-2013 -closed as requested- |