Navigate Select ESC Close

#24 Methods in Java

2023-01-18 Science & Technology
465.0k
5.1k
69
Telusko
Telusko
2.8m subscribers

Unlock all features

FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.

Description

Check out our courses: Industry-Ready Java Spring Boot, React & Gen AI -Live: https://go.telusko.com/industry-ready-course Coupon: TELUSKO10 (10% Discount) AI-Powered DevOps with AWS- Live V3: https://go.telusko.com/ai-powered-devops-with-AWS-v3 Coupon: TELUSKO10 (10% Discount) Master Java Spring Development : https://go.telusko.com/masterjava Coupon: TELUSKO20 (20% Discount) For More Queries WhatsApp or Call on : +919008963671 website : https://courses.telusko.com/ Java Spring:- https://go.telusko.com/Udemyjavaspring Java:- https://go.telusko.com/udemyteluskojava Spring: https://go.telusko.com/udemyteluskospring Java For Programmers:- https://go.telusko.com/javaProgrammers Python : https://go.telusko.com/udemyteluskopython Git : https://go.telusko.com/udemyteluskogit Docker : https://go.telusko.com/udemyteluskodocker Instagram : https://www.instagram.com/navinreddyofficial/ Linkedin : https://in.linkedin.com/in/navinreddy20 WhatsApp : https://go.telusko.com/whatsapp TELUSKO Android App : https://go.telusko.com/TELUSKOAPP TELUSKO IOS App : https://apple.co/3SsgmU2 Discord : https://discord.gg/D8hWe9BqfF 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 : https://github.com/navinreddy20/Javacode.git More Learning : Java :- https://bit.ly/3x6rr0N Python :- https://bit.ly/3GRc7JX Django :- https://bit.ly/3MmoJK6 JavaScript :- https://bit.ly/3tiAlHo Node JS :- https://bit.ly/3GT4liq Rest Api :-https://bit.ly/3MjhZwt Servlet :- https://bit.ly/3Q7eA7k Spring Framework :- https://bit.ly/3xi7buh Design Patterns in Java :- https://bit.ly/3MocXiq Docker :- https://bit.ly/3xjWzLA Blockchain Tutorial :- https://bit.ly/3NSbOkc Corda Tutorial:- https://bit.ly/3thbUKa Hyperledger Fabric :- https://bit.ly/38RZCRB NoSQL Tutorial :- https://bit.ly/3aJpRuc Mysql Tutorial :- https://bit.ly/3thpr4L Data Structures using Java :- https://bit.ly/3MuJa7S Git Tutorial :- https://bit.ly/3NXyCPu Donation: PayPal Id : navinreddy20 https://www.telusko.com

Top Comments (10)

@abhishekmitra9712 2023-06-02

Watching this video today and realized that your joke about "Nothing phone" actually became true. There is actually something called nothing phone.😄

93 2 replies
@mcgrit 2023-09-07

The "Nothing" joke hits hard. haha loved it 😂

54 1 replies
@christyaldridge3839 2024-04-29

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

34
@Sorj108 2023-09-29

Nothing phone 🤣 Thanks for those great updated videos! Much love from Mauritius

23
@KelvinOsondu-n2o 2025-07-30

"Ignore my poor jokes " hit hard 😂 Keep up the good work sir!!

6
@NILOJMUKHERJEE 2025-06-25

Excellent teaching by u sir and that was a good joke of nothing phone🤣🤣🤣🤣🤣🤣

3
@BrindhaS-er6lu 2026-01-28

Thank you sir 😊❤️

2
@Spartan17_yt 2025-07-05

How beautifully this person explains

2
@UzairSahab-e5z 2025-07-26

sir your teaching is great

2
@wesjales5578 2024-03-10

Why are youtube videos literally alway better then in person lectures?

1

Unlock the Data Inside
Turn Videos into Knowledge

  • Get FREE 10/day: transcripts, summaries, chats
  • Chat with videos, export text & PDF
  • $1 free API credit for RAG, chatbots & research

Free forever plan • All features unlocked

App screenshot