---
title: "Discussion on \"Functions/Methods in Java\" | Hashnode"
description: "Discussion on \"Functions/Methods in Java\". A method is a block of code which only runs when it is called.\n\nTo reuse the code: define the code once & use it many times\n\n\nSyntax\n<access modifier> <return type> <method name>(<parameter list>) {\n    // method body\n    return <value>;\n}\n\nNow, let'..."
url: "https://hashnode.com/posts/functionsmethods-in-java/66e065fefb2aba572a1cc378"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Functions/Methods in Java](https://saswatpal.hashnode.dev/functionsmethods-in-java?utm_source=hashnode&utm_medium=feed)

A method is a block of code which only runs when it is called. To reuse the code: define the code once & use it many times Syntax <access modifier> <return type> <method name>(<parameter list>) { // method body return <value>; } Now, let'...

Sep 10, 2024 · 9 min read · saswatpal.hashnode.dev  
Read the article

-   [#methods](https://hashnode.com/tag/methods)
-   [#java](https://hashnode.com/tag/java)

## Written by

[Saswat Pal](https://hashnode.com/@saswat2002)

@saswat2002

  
[View profile](https://hashnode.com/@saswat2002)

Computer science student | Learning Java + DSA | Coding enthusiast

Hi there! I'm a computer science student with a keen interest in Java programming and Data Structures &amp; Algorithms. Currently, I am honing my skills in these areas and also familiar with C, C++. As an aspiring developer, I am always open to new opportunities and collaborations that allow me to learn and grow. Let's connect and create something great together!

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
