Java Tutorial #26🔴METHOD OVERLOADING | METHODS | Tagalog | English | Filipino | 2021
Java Tutorial #26🔴METHOD OVERLOADING | USER DEFINED METHODS | Tagalog | English | Filipino | 2021. In this episode you will learn three different ways on how to Overload Methods in Java, having DIFFERENT NUMBER OF PARAMETERS, DIFFERENT DATA TYPE OF PARAMETERS, and DIFFERENT SEQUENCE OF DATA TYPES OF PARAMETERS. If two methods have same name, same parameters and have different return type, then this is not a valid method overloading. Method Overloading happens when a class has two or more methods by the same name but different parameters. If we have to perform only one operation, having same name of the methods increases the readability of the program., and that is the advantage of Method Overloading in Java. In this episode, you will also learn how to overload main() methods. You can have any number of main methods in a class by method overloading, but Java Virtual Machine (JVM) calls main() method which receives string array as arguments only. You will also learn different Data Types Promotion. One Data type is promoted to another implicitly if no matching Data type is found. If there are matching type arguments in the method, type promotion is not performed. If there are no matching type arguments in the method, and each method promotes similar number of arguments, there will be ambiguity and will result to compile time error. Example of Type Promotion: 🔷 byte → short → int → long 🔷 short → int → long → float → double 🔷 int → long → float → double 🔷 float → double 🔷 long → float → double 🔷 char → int → long → float → double (a = 97) ASCII code equivalent 🔴★★★INSTAGRAM LINK ★★★🔴 FOLLOW US ON INSTAGRAM: https://www.instagram.com/thecodingchannelph/ ⌚ Timestamps ⌚ 00:00 Introduction 01:02 Method Overloading: Different Number of Parameters 08:06 Method Overloading: Different Data Types of Parameters 11:37 Method Overloading: Different Sequence of Data Types of Parameters 15:28 Valid | Invalid Cases Of Method Overloading Exercise 20:00 Overloading Main Methods 23:46 Method Overloading and Type Promotion 31:30 Wrap Up 32:49 OUTRO 👋Topics Covered 👋 🔷 Method Overloading: Different Number of Parameters 🔷Method Overloading: Different Sequence of DataTypes of Parameters 🔷Method Overloading: Different Data Types of Parameters 🔷Overloading Main Method 🔷Method Overloading and Type Promotion 🔷Void Methods 🔷Value Returning Methods 🔷 Static and Non Static Methods 🔷 Calling Void Methods 🔷 Calling Value Returning Methods 🔴★★★CHANNEL LINK ★★★🔴 Show Your Love By Subscribing And Sharing This Link: https://www.youtube.com/channel/UCjOB5JqP7LzhB2o9dbabH1w #thecodingchannelph
Download
1 formatsVideo Formats
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.