Posts

Showing posts with the label Interface in Java

Advanced Java Programming

Image
                          Advanced Java Programming Advanced Java Programming :-   Introduction to advance java   As most of us already know that if we want to make normal applications it  can be easily built using core Java concepts. But, when it we need to develop web applications, advanced Java fundamentals, like JSP, Servlets, JDBC etc. needed, so to add capabilities and features of the application advance java is essential for developers. Through the motive of this blog is to explain about Advanced Java, I will be giving you a complete insight into the fundamental concepts of Advance Java. Figure - 1.2 If you want to see complete video on this please  have a look the video below.                              Learn with Resh u Advanced Java Programming Course ...

Interface in Java

Image
  Interface in Java What is Interfaces Another way to achieve abstraction in Java, is with interfaces. It’s a blueprint of a class, which tells by class what to do not how to do. An interface is a completely "abstract class" that is used to group related methods with empty bodies.  Features of Interfaces It is used to achieve abstraction. It supports multiple inheritance. It can be used to achieve loose coupling Like abstract classes, interfaces cannot be used to create objects Interface methods do not have a body - the body is provided by the "implement" class On implementation of an interface, you must override all of its methods Interface methods are by default abstract and public Interface attributes are by default public, static and final An interface cannot contain a constructor (as it cannot be used to create objects) Why and When to use Interfaces 1) To achieve security - hide certain details and only show the important details of an object (interface)....