Tag Archives: Core java

Difference between final & finally & finalize keyword?

Difference between final & finally & finalize keyword?

Difference between final & finally & finalize keyword? The keyword final is an access modifier, finally is a block and finalize is a method. The keyword final is applicable to the classes, variables and methods of the classes finally is a block associated with the try catch block that is used to handle exceptions, finalize is a method that operates ...

Read More »

Explain Default exception handling in Java?

Default exception handling in Java ?

Explain Default exception handling in Java? Inside a method, if any exception occurs the method in which it is raised is responsible to create exception object by including the following information. Name of exception Description of exception Location at which exception occurs(Stack trace). After creating exception object method handover that objects to the JVM. JVM will check whether the method ...

Read More »

What is Exception and Runtime stack mechanism?

What is Exception and Runtime stack mechanism? An unexpected unwanted even that disturbs normal flow of the program is called an exception.  It is highly recommended to handle the exceptions and the main objective of exception handling is graceful termination of the program. Exception Handling doesn’t mean repairing an exception. We have to provide an alternative way to continue rest ...

Read More »

Difference between IS-A relationship and Has-A relationship.

Difference between IS-A relationship and Has-A relationship.

Difference between IS-A relationship and Has-A relationship. IS-A Relationship It is known as an inheritance The main advantage of IS-A relationship is code reusability. By using extends keyword we can implement IS-A relationship. Whatever method parent has by-default available to the child and hence on the child reference we can call both parent and child method. Whatever method child has by-default ...

Read More »

What is Encapsulation?

What is Encapsulation?

What is Encapsulation? The process of binding data and corresponding method into a single unit is nothing but encapsulation.  If any component follows Data Hiding and Abstraction such type of component is said to be encapsulated component. Encapsulation = Data hiding + Abstraction. Encapsulation is a principle of wrapping data (variables) and codes together as a single unit. It is ...

Read More »

What is the use of Abstract modifier in Java

What is the use of Abstract modifier in Java

  What is the use of Abstract modifier in Java An abstract is a modifier applicable to classes and methods but not for variables. Abstract Method Even though we don’t know about implementation still, we can declare a method with abstract modifier i.e. for the abstract method the only declaration is available but not implementation hence abstract declaration should end ...

Read More »

Responsive WordPress Theme Freetheme wordpress magazine responsive freetheme wordpress news responsive freeWORDPRESS PLUGIN PREMIUM FREEDownload theme free