search
HomeJavaJavaBasewhat is java method

what is java method

Nov 22, 2019 am 10:19 AM
java

what is java method

What is the method?

A Java method is a collection of statements that together perform a function.

A method is an ordered combination of steps to solve a type of problem

Methods are contained in classes or objects

Methods are created in the program and referenced elsewhere

Advantages of the method

1. Make the program shorter and clearer.

2. Conducive to program maintenance.

3. It can improve the efficiency of program development.

4. Improved code reusability.

Name rules for methods

The first word of the method name should start with a lowercase letter, and subsequent words should start with an uppercase letter, without using connections. symbol. For example: addPerson.

Underscores may appear in JUnit test method names to separate logical components of the name. A typical pattern is: test_, such as testPop_emptyStack.

For more java knowledge, please pay attention to java basic tutorial.

The above is the detailed content of what is java method. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.