Method Overloading, Nesting | Java Object Oriented Programming Video Tutorials

preview_player
Показать описание
In this beginners object oriented java programming video tutorial you will learn about method nesting and overloading in java language in detail with example.

This video lecture teaches about what is method overloading, how to do that with example, what is method nesting, how to do it, what is the advantage of it in detail with example.

Get the source code of this tutorial at our website

Watch Video tutorials in HINDI at

Catch us on SocialMedia
Рекомендации по теме
Комментарии
Автор

Thank you for the tutorial! Very useful and easy to understand for such newbie as myself.
Wish you to succeed!

Meow
Автор

it's indeed a pefect explanation of overloading THANK YOU for sharing. I'm wondering can one do overloading string-char or other datatypes?

yunuskarabash
Автор

now i understand this tutorial buy I can't see any reason that I would call the method like that. more work then what is needed. I understand it's just an example for a tutorial. But I'm just trying to figure out when I would program like that. P.S. your tutorials are awesome. you really helped me out a lot more than thenewboston's java tutorials.

jasonzimmerman
Автор

You said two methods with same name and return type cannot have same arguments type . Double and Int types are the same but it was showing error, then you added third argument to resolve the duplicate Double and int are not same, why did it displayed an error ?

ayushman_sr
Автор

int result = 4;
System.out.println(result);

if I write like this
it works fine

int result = max(6, 4);
System.out.println(result);

is shows an error

shakilzaman
Автор

I'm so OCD. I can't stop focusing on getting that r off of doubler. hehe

jasonzimmerman
Автор

nevermind, i guess i should have watched the whole tutorial first. now I see. lol

jasonzimmerman
Автор

TEACHER.JAVA

package learningjava;

public class teacher {
public static void main(String[] args)
{
student anil=new student();
System.out.println("maximum number is ") + anil.max(1, 2, 3, 4));
}

}


STUDENT.JAVA

package learningjava;

public class student {
int max(int n1, int n2)
{if(n1>n2)
{
return n1;
}
else
{return n2;}
}


int max(int n1, int n2, int n3, int n4)
{
int res=max(n1, n2);
int result=max(res, n3);
return max(result, n4);

}
}



whats wrng wd dis code its gvng error
"at

durgeshmishra
join shbcf.ru