fbpx
  1. Tubelator AI
  2. >
  3. Videos
  4. >
  5. Education
  6. >
  7. Exploring Core Java Concepts: OOPs(Object Oriented Programming) Part-4 - Overloading

Exploring Core Java Concepts: OOPs(Object Oriented Programming) Part-4 - Overloading

Available In Following Subtitles
English
Variant 1
Posted on:
Gain a deep understanding of overloading in Object Oriented Programming as we delve into important concepts and cases. Prepare for your OCJP/SCJP exam and nail your upcoming interviews with key insights and knowledge on this vital Java concept.
tubelator logo

Instantly generate YouTube summary, transcript and subtitles!

chrome-icon Install Tubelator On Chrome

Video Summary & Chapters

No chapters for this video generated yet.

Video Transcript

0:05
So, in the last session, so just we started about overloading, one of very important concepts
0:13
of whoops, overloading concept just we started right.
0:16
Now my next target here is related to overloading, there are several important loopholes are
0:23
there.
0:24
Ok, what is overloading?
0:25
Everyone can aware.
0:26
But what internal loopholes?
0:28
Let me talk around 5 to 6 cases so that you people can feel comfortable with overloading
0:34
right.
0:34
but every case very important for the exam, very important for the interview room.
0:40
Now let me go for case 1.
0:46
Let me go for case 1 here.
0:48
Just observe.
0:50
Sir, I am taking class test.
0:54
Now very very important case.
0:56
Class test.
0:57
Here public, public.
1:00
public void m1 of int i, sir public void m1 of int i, system.out.println int arg method,
1:18
int arg method, public void m1 of int i, int arg method.
1:21
Next, public wire M1R floatf system.out.println floatarc method floatarc method.
1:40
Ok.
1:40
So, total how many methods are there?
1:43
There are two methods.
1:44
Can I use the term these two methods are overloaded methods or not?
1:48
Yes, because both the methods having same name but different argument types.
1:55
That's why I can use the word, these two methods are what?
1:59
Overloaded methods.
2:00
These two methods are overloaded methods.
2:04
Next up, here see public static void main method, public static void main method string
2:15
array aux, public static void main string array aux.
2:22
Now tester T is equal to new tester, now tester T is equal to new tester.
2:31
Now I am calling T dot M1 method by passing 10 as the argument.
2:41
So T dot M1 of 10, 10.
2:43
Can you tell which method will get the chance now?
2:46
Ah, inter-arg.
2:47
Because exact match is always going to get high priority.
2:51
Inter-arg, right.
2:53
Inter-arg.
2:54
Next, T dot M1 of 10.5.
3:00
f, t dot m1 of 10.5 f, can you tell what the answer we are going to get now, float arc,
3:09
float arc, sir inter argument and float arc method, right, next term, t dot m1 of, here
3:18
just observe, at this stage, so at this stage let me explain one small, small example or
3:31
small, you know what experience I have, a funny experience I have related to this example.
3:36
Few years back, almost around 4 or 5 years back, I was taking only one batch, morning
3:44
7 to 9 batch only.
3:46
So if the class is started, ok then after 2 months the batch will be there.
3:51
So these many number of batches won't be there at that time.
3:54
Then what happened is, so one time I was there in the reception chair, then the number of
4:00
students are coming.
4:00
also 4 or 5 members, very less number of students are there, only 10 members are there in that
shape-icon

Download extension to view full transcript.

chrome-icon Install Tubelator On Chrome