Similar to class, interface in Java is a collection of abstract methods. Interfaces are implemented by class so it inherits the abstract methods. Interface might contain nested types, default and static methods and constants. Only default and static methods will contain the method bodies in interface. The coding process of interface is similar to the […]
Difference Between Nested Static and Inner Class
Inner and Nested Classes in Java are classes which are declared inside another class. In Java the class which are declared as static is called as “nested static class” while other classes are known as “inner classes”. The difference between inner and nested class is a common question in Java interviews. In this article, will […]
Difference Between Abstract Class and Interface
The difference between the interface and abstract is a very common question in core Java interviews. It is better to start answering this question with a slight introduction about abstract class and Interface. What is Abstract Class? Abstract classes are the class, which defines an abstract concept and it cannot be instantiated. Abstract classes are […]
Difference Between Class and Objects
The knowledge about the difference between class and object question is the requirement for a candidate to attend a programming interview that involves any object oriented programming. Every programmer regard the terms, object and class as pillars of OOPS. Class can be defined as the blueprints and objects are existing things that are created from the […]
What is Argument Defined Anonymous Inner Class?
Anonymous inner class is a type of inner class which is declared without a name. Basic Syntax for Anonymous Inner Class: /* Give importance to the beginning curly braces & there is a fact that the semicolon at the end is also important, While creating an anonymous class:*/ AnonymousInnerClass karthikh= new AnonymousInnerClass () { // […]
What is Anonymous Inner Class?
An Anonymous inner class is declared by without name and the syntax of an anonymous inner class is also different from other inner classes. Many Java developers believe that anonymous inner classes increase the complexity of the code. But they are extremely helpful in defining the subclass. It is easy to define callbacks using anonymous […]
What is Final Modifier?
Final modifier in Java is used to indicate a method cannot be overridden in a derived class. When final modifier is declared it prevents the class from acting as a base class and stops the derived class. This process will prevent late binding which in turn stops polymorphism. Final modifiers will always precede the statement […]
- « Previous Page
- 1
- 2
- 3
- 4
- 5
- …
- 7
- Next Page »