It is a concept in java to achieve the Dynamic / Run-time polymorphism. It is the process of assigning sub-class object in super type reference later if needed that sub-class object can be type-caste into its super type. Dynamic dispatch can be achieved only with the instance member. Important point regarding dynamic dispatch 1. If we are trying to access instance member with dynamic dispatch concept then it will access sub-class overridden...
Interface is a keyword in java and also a concept in java to over come the limitation of not supporting multiple inheritance by java. Now with the concept of interface we can have implement multiple interface full filing the concept of a " single class extending more than one class ". In the case of class we can extend only one but with the interface we can implement more than one interface. Click here to know why java is not supporting multiple...
When we use an abstract modifier before the name of any user-define class then it is called as an abstract class. Abstract class in java has only method signature whose implementation must be in its sub-classes. Important points regrading Abstract class 1. It cannot be instantiate means we cannot create object of an abstract class. 2. An abstract class can have instance member. 3. Abstract class doesn't have any method implementation instead...
Abstract is a keyword in java. So its a reserved word in java. general meaning of abstract is to hide the implementation, only show the outer structure. Now in computer science its meaning is that user can have their own implementation with abstract method. Where we can use abstract keyword ? Abstract can be used with class and method. By using abstract with the method a user can able to have their own implementation according to their wish....
...
Like public and private, protected is also a access modifier which has different visibility scope and it is also one of the keyword in java. Its scope are valid to the other packages but it should be within the sub-class. Like private we can be able to use protected scope with the constructor, methods, variables and inner classes. Accessing protected member outside its scope will give compilation error saying " Not Visible ". Note : We cannot...
Private is the keyword in java and it is also called as the access modifier in java which defines the visibility to the members of the class like methods, constructors, variables etc. Declaring private to the members of the class will limit theirs visibility to that class only. If we are trying to access any private member in another class then compiler will give compilation error as " Member are not visible ".   Note : We cannot use...
As its name ' public ' itself indicates that any member of the class declared as public will be visible and accessible ANYWHERE. We have two scope in java programs : 1. Class scope Sub-class in the same package       --> Public is visible . Sub-class in different package        --> Public is visible. Another class in the same package --> Public is visible. Same class in the same package    ...
Access Modifier in java defines the scope of accessibility of methods, constructors, variables etc. So to access the different members of the class/interfaces with different scope we have three access modifiers : 1. Public   --> Defines visibility everywhere               2. Private   --> Defines visibility within the current class only         3. Protected...
Like other classes in java , anonymous is also a type of class but it doesn't have any name like other classes have their own name either defined by the user or pre-defined in the java by the java vendors. So anonymous class is defined as the class without name and it is defined by the user only. No need of wonder that how a class can exist without any name ? Its not that it doesn't have any name but generated by the compiler at the run-time....
Local inner class is a class which is define local to the outer class. So it must be defined within the local scope of a class like method, constructor or initialization block . A class within a class in never treated as the local inner class. And most importantly scope of the inner class will be limited to where it is declared, outside of which it is not valid. As local inner class is the local scope to the outer class then we all know that within...
Like Instance inner class we have also static inner class. Static instance class is loaded at the time of loading the outer class as it is declared as static that means it will act as the static member of the outer class and hence we can be able to define static member as it get initialized at the time of loading the outer class. Important point regarding Static inner class 1. We can be able to define static and instance both in the static inner...
As the name itself indicates that inner class with non-static scope that means a member of outer class which is of instance scope called as instance inner class. Instance inner class is itself a class but we cannot use any static member. Why we cannot use any static member in instance inner class ? --> It is first treated as the member of outer class. Because of this if it is declared as non-static that means JVM is not going to load the class...
Inner class in a class defined as a class inside another class. So it is itself a class but first it will act as a member of that class. As we know that we cannot make a class as static but inner class can be made as static which proves that it is first a member of a class in which it is defined . We can execute our class with its name but to execute a inner class we need to take help of outer class that proves that an inner class has identity...
Like this in java one more most important keyword is there i.e super. super in Java has a wide use and it is mainly used to call the super class constructor explicitly by the user and implicitly used by the JVM to initialize the super class property. Have you ever wondered that how super class members get instantiated by creating subclass object ? Let suppose we have two class A and B following inheritance relation where B is extending A that means...
this is one of the most important keyword in java which refers to the current class object. Like we are creating an object for our class similarly internally a object is there called as this which points to the current class object unless we create an Object.We can say that  'this ' is not an actual object but it points to the current class object. Accessibility of ' this ' refers to the current object that means if we have more than one object...
Translating JSP to Servlet. (hello.jsp->hello_jsp.java) Compile the translated Servlet. (hello_jsp.java->hello_jsp.class) Loads the translated Servlet. Creates the instance of translated Servlet. Calls the life cycle method _jspInit(). when user sends the request then container calls the life cycle method _jspService(). At container shutdown time, containers call the _jspDestroy() method of life cycle. You can find the translated Servlet...
Cache is representation of database near to application. when you cache the read-mostly(which will be repeatedly used) data, you can reduce the number of round trip between your application server and database server. Which increase performance of your application. In general you can have three types of cache scope : Transactional scope cache. Process scope cache. Clustered scope cache. 1. Transactional scope cache : This kind of catch will be...
Constructor is the member of the class and it has name same as class name. Constructor is the one of the important concept in java which is responsible to initialize the instance member of the class. Its functionality is like a method only  but used by the JVM as a indicator to initialize the instance variable. It is first invoked by JVM while creating the object of the user defined class. And to support inheritance it is calling super class...

Ads 468x60px

.

Ads

.

Featured Posts

Popular Posts

Like Us On FaceBook

Total Pageviews

Online Members

Live Traffic