No video

#24 Methods in Java

  Рет қаралды 211,499

Telusko

Telusko

Күн бұрын

Check out our courses:
Complete Java Developer Course Batch-3: go.telusko.com...
Coupon: TELUSKO10 (10% Discount)
Enterprise Java Spring Microservices: go.telusko.com...
Coupon: TELUSKO10 (10% Discount)
Master Java Spring Development : go.telusko.com...
Coupon: TELUSKO20 (20% Discount)
For More Queries WhatsApp or Call on : +919008963671
Udemy Courses:
Spring: go.telusko.com...
Java:- go.telusko.com...
Java Spring:- go.telusko.com...
Java For Programmers:- go.telusko.com...
Python : go.telusko.com...
Git : go.telusko.com...
Docker : go.telusko.com...
website : courses.telusk...
In this lecture we will learn:
- Method in Java
- Use of methods in Java
- Main method in Java
- return type in methods
- Syntax of method
#1
A method in Java or Java Method is a collection of statements that perform some specific task and return the result to the caller.
- Methods in Java allow us to reuse the code without retyping code.
- In Java, we create the components with the help of classes.
- Every class has a behavior and it is defined through the method.
- Behaviour or method is defined with the round brackets ().
- For every method, we also have to specify the type of access to it.
- Method does some tasks and it also returns something.
- We can call methods by creating an object.
- We can pass also pass values in a method.
- We can also put conditions inside the method like with the help of if..else.
- return keyword stops the execution of a method as it does not execute the further statements after it.
#2
-- void is used when we do not want a method to return something.
-- String is used to return a string value.
-- int is used to return an integer value.
- Main method is the start of execution from where the program begins.
#3
The syntax for method:-
class Computer
{
public void playMusic()
{
System.out.println("Music Playing..");
}
}
Github repo : github.com/nav...
Java:- bit.ly/JavaUde...
Spring:- bit.ly/SpringU...
More Learning :
Java :- bit.ly/3x6rr0N
Python :- bit.ly/3GRc7JX
Django :- bit.ly/3MmoJK6
JavaScript :- bit.ly/3tiAlHo
Node JS :- bit.ly/3GT4liq
Rest Api :-bit.ly/3MjhZwt
Servlet :- bit.ly/3Q7eA7k
Spring Framework :- bit.ly/3xi7buh
Design Patterns in Java :- bit.ly/3MocXiq
Docker :- bit.ly/3xjWzLA
Blockchain Tutorial :- bit.ly/3NSbOkc
Corda Tutorial:- bit.ly/3thbUKa
Hyperledger Fabric :- bit.ly/38RZCRB
NoSQL Tutorial :- bit.ly/3aJpRuc
Mysql Tutorial :- bit.ly/3thpr4L
Data Structures using Java :- bit.ly/3MuJa7S
Git Tutorial :- bit.ly/3NXyCPu
Donation:
PayPal Id : navinreddy20
www.telusko.com

Пікірлер: 43
@christyaldridge3839
@christyaldridge3839 4 ай бұрын
I have never really understood the concept of Class, Methods and Object until i watched this video... you really broke it down brother...Excellent instructions
@abhishekmitra9712
@abhishekmitra9712 Жыл бұрын
Watching this video today and realized that your joke about "Nothing phone" actually became true. There is actually something called nothing phone.😄
@smittt20
@smittt20 18 күн бұрын
The kind of details in the video like explaining every single word from void to object to function helped me a lot, i have never understood class and object effectively until now. Thanks a lot sir
@burpeesquad
@burpeesquad 11 ай бұрын
The "Nothing" joke hits hard. haha loved it 😂
@mango-strawberry
@mango-strawberry Жыл бұрын
Your explanation is extremely good
@Tanned_guy
@Tanned_guy Жыл бұрын
Excellent teaching.
@Sorjen108
@Sorjen108 11 ай бұрын
Nothing phone 🤣 Thanks for those great updated videos! Much love from Mauritius
@melwinsanthosh8135
@melwinsanthosh8135 Жыл бұрын
You are teaching very well than my teachers
@heycreatives
@heycreatives Жыл бұрын
Way of explain its really good.even don't know java also easy to understand...
@sidharthansidhu4783
@sidharthansidhu4783 10 ай бұрын
It is weird how a Computer returns a pen😄. Excellent teaching 😍
@Lwa-fq5yz
@Lwa-fq5yz Ай бұрын
🤣
@user-lt4dh1yf4u
@user-lt4dh1yf4u 19 күн бұрын
Will you please explain why this playlist is not a continuous one ,like when i watch video number 23 and go to 24 ....you were actually saying that in previous video we have seen something like calculator program which doesn't exists in the previous whichever i watched
@NoName-im9rp
@NoName-im9rp Жыл бұрын
awesome sir keep it up
@wesjales5578
@wesjales5578 5 ай бұрын
Why are youtube videos literally alway better then in person lectures?
@Gunasekhar-zj6eh
@Gunasekhar-zj6eh Ай бұрын
what is the environment you are using?
@AriRam-xs7ie
@AriRam-xs7ie 9 ай бұрын
Can you please explain about the ' . ' (Dot)operater and it's function
@yashaswinihm4288
@yashaswinihm4288 8 ай бұрын
It's basically used as a accessing operator. General used with object to access the data variables and methods
@RishiKBose-25
@RishiKBose-25 7 ай бұрын
Sir, it would be advisable to update your IDE promptly.
@juturtaur298
@juturtaur298 10 ай бұрын
Thank you sir
@DarkyBoy-n1i
@DarkyBoy-n1i Ай бұрын
But you teach well and I've never seen a teacher like you.
@jb6652
@jb6652 5 ай бұрын
how do you make the terminal on right side like that?
@asuradevan1702
@asuradevan1702 10 ай бұрын
Well Teached
@sahanbandaranayake708
@sahanbandaranayake708 Жыл бұрын
great explanation 😍
@user-mx4en5jf7v
@user-mx4en5jf7v 9 ай бұрын
its nice to get a nothing phone at 2 rupees!!
@everyone3602
@everyone3602 Жыл бұрын
dr's of java
@iamgold743
@iamgold743 3 ай бұрын
bro but compiler show : you shoud declare main method in computer class
@debo8234
@debo8234 8 ай бұрын
poetic
@user-px5pj7ux5k
@user-px5pj7ux5k 11 ай бұрын
Hi Sir, please help🙏, how to access the variables inside the method to another method? Void Room1(){ name1="Elisa"; name2="Jefrey"; } Void Room2(){ i want to access "Elisa" }
@droste07
@droste07 10 ай бұрын
Then you have to create instance variable (variable inside the class) then you can access it anywhere in the class block!
@czarscrib3680
@czarscrib3680 3 ай бұрын
I knew about the nothing phone but I wasn't expecting that joke😅😅😅😅
@ozodbekhamidov987
@ozodbekhamidov987 Жыл бұрын
good exam
@DarkyBoy-n1i
@DarkyBoy-n1i Ай бұрын
Sir, Who returns nothing?🤣🤣🤣🤣
@pratiktiwariramji
@pratiktiwariramji 27 күн бұрын
Exams 😂🤣
@rkrk5378
@rkrk5378 9 ай бұрын
One SUGESSTION Sir, Please don't give different 2 examples, Please stick to one example through out the video.. if you are giving example of 'Computer' then please stick to that example only Instead of giving several examples like Car, Pen, Computer etc this could confuse a viewer.. OTHERWISE THE VIDEO WAS GOOD
@singasong7679
@singasong7679 Жыл бұрын
method inside method give error. please correct this anyone ij() in k() method show error class A{ int i; int j; void ij(){ System.out.println("i and j"+i+ " "+j); } int show(){ return i+j; } class B extends A{ int k; void k(){ System.out.println("value of k"+k); ij(); } int sumijk(){ return show()+k; } public static void main(String[] args) { B obj =new B(); obj.i=44; obj.j=33; obj.k=21; int c=obj.sumijk(); System.out.println("value of sum"+c); } } }
@vanajakshibc4587
@vanajakshibc4587 5 ай бұрын
U have pass values to the methods which does calculation and returns values
@AnuragRawat01
@AnuragRawat01 Жыл бұрын
9:45 Let's put Joke aside but you need to focus at learning Joke unlike this one 😅😅
@hozsumosa9322
@hozsumosa9322 Жыл бұрын
What poor jokes, poor + funny jokes 😁 9:52
@hareeshbhat2571
@hareeshbhat2571 6 ай бұрын
i didnt get laugh because of nothing but at last sir said ignore my poor jokes🤣🤣🤣
@rawcore
@rawcore Ай бұрын
09:50 Sponsored by Nothing huh 😂 .
@ahmedmoussa7519
@ahmedmoussa7519 6 ай бұрын
Nothing Phone
@bantaigamer7123
@bantaigamer7123 5 ай бұрын
sir pls hindi me bataiye
@GurijalaSudhakarrao
@GurijalaSudhakarrao Ай бұрын
Super anna
#25 Method Overloading in Java
6:03
Telusko
Рет қаралды 188 М.
#26 Stack And Heap in Java
12:37
Telusko
Рет қаралды 235 М.
Violet Beauregarde Doll🫐
00:58
PIRANKA
Рет қаралды 34 МЛН
Dad Makes Daughter Clean Up Spilled Chips #shorts
00:16
Fabiosa Stories
Рет қаралды 3 МЛН
Please Help Barry Choose His Real Son
00:23
Garri Creative
Рет қаралды 23 МЛН
拉了好大一坨#斗罗大陆#唐三小舞#小丑
00:11
超凡蜘蛛
Рет қаралды 14 МЛН
Stream API in Java
26:04
Telusko
Рет қаралды 313 М.
Learn Any Programming Language In 3 Hours!
22:37
Code With Huw
Рет қаралды 352 М.
Java methods 📞
11:05
Bro Code
Рет қаралды 129 М.
#22 Class and Object Practical in Java
15:36
Telusko
Рет қаралды 228 М.
Fastest Way to Learn ANY Programming Language: 80-20 rule
8:24
Sahil & Sarra
Рет қаралды 831 М.
#40 Encapsulation in Java
11:42
Telusko
Рет қаралды 166 М.
#23 JDK JRE JVM in Java
5:22
Telusko
Рет қаралды 237 М.
Java Main Method Explained - What Does All That Stuff Mean?
7:10
Coding with John
Рет қаралды 227 М.
#51 This and Super Method in Java
12:11
Telusko
Рет қаралды 102 М.
Violet Beauregarde Doll🫐
00:58
PIRANKA
Рет қаралды 34 МЛН