Tuesday, 17 October 2017

Difference between Overloading & Overriding of Method in java


Method Overloading

Method overloading :

1). A Method with the same name but the different argument is called method overloading.
2). It is an example of compile-time polymorphism.
3). The method call to its definition has happened at compile time.
4). Method Overloading is performed within a class.
5). Access specifier can be changed. 
6). private and final methods can be overloaded.
 7). Overloading is a compile-time concept.
8). Inheritance is not invoked.
9). Parameters must be different.
10). The private, static and final class can be overloaded.


Method Overriding :

1). A Method with the same name and the different argument is called method overriding.
2). It is an example of run-time polymorphism.
3). The method call to it's happening at run-time.
4). Method Overriding occurs in two classes that have IS-A(Inheritance) relationship.
5). Access specifier must not be more restrictive than the original method.
6). Private and final methods can't be overridden.  
7). Overriding is a run-time concept.
8). Inheritance is invoked.
9). Parameters must be same.
10). Private, static and final class can't be overloaded.

thejavaxpert blog,, Piyush Dabhi blog, Dabhi Piyush blog, TheJavaXpert blogger owner name,  Java all info, java master, java manual, java Expert, Java Best information, Java New blog, JAVA, Piyush, Dabhi, piyush blog, Pkdabhi,  Gurukul blog, BCA, BCA best knowledge, IT, IT knowledge,  language, OOP concept, Full OOP languages name, All java program, Core java, Core Java Interview, Java Knowledge, JAVA language, Full Object oriented languages, Java nice info, Java best knowledge, Java Master, Java  java,, My java, javazone, Java game programming, java programs, java GUI, Java Blog, Top 10 java blog, javaxpert is the best blog, Java new blog list,  java top 10 blog, java top website, java top web, java,Control statement,Java token,Pk dabhi,techno pk,JAVA hindi,java in gujrati, java in all language,java cool knowladge Java world, java info blog, java technology,J2ee,J2ee java,J2me,java 2 standard edition,Inheritance in java,Difference between Static And Non-Static MembersStatic Versus Non-Static Member,Constructor in JavaConstructor,Finalize() MethodFinalize() Method,The Basic Concept of OOP(Object Oriented Programming)Basic Concept of OOP ,How to get values from userCommand line argument,Array In JavaArray,Control StatementControl statement,Type Casting/ Type Conversion in JavaType casting ,java OpearatorsJava Basic perators, Operators of Java,Java TokenJava Token, Java Tokens,Data TypeDatatype,How to set path in Java?SetPath In Java ,Compiling And Executing Basic Java ProgramExecutin Basic Java Program,What Is JavaWhat is java?,JVM, JRE, Difference between JVM and JREJVM ,Discussion of JDK(Java Development Kit)JDK,C++ V/S JavaCPP v/s Java,Features/Advantages Of JavaFeatures of Java ,History Of JavaHistory of Java

Post a Comment

Click Here