Java learning memo (method)

Since I started studying Java Silver, I will upload it as my memorandum. Since it is a rough memo, details are not described.

About the return type in the method definition.

Method to return int type int method(int num){ return num * 5; }

If no return value is returned void method(int num){ System.out.println(num); }

If you declare a return type without returning a return value, a compile error will occur. Also, if you try to return with a type different from the declared return type, a compile error will occur.

Recommended Posts

Java learning memo (method)
Java learning 2 (learning calculation method)
[Java ~ Method ~] Study memo (5)
Java learning memo (basic)
Java learning memo (interface)
Java learning memo (inheritance)
Java learning (0)
Java method
Java learning memo (data type)
java (method)
Java Silver Study Method Memo
Create a java method [Memo] [java11]
Java memo
Java learning memo (logical operator)
Java learning memo (abstract class)
Java method
[Java] method
[Java] method
Java learning memo (creating an array)
Java learning memo (while statement, do-while statement)
[Java] Processing time measurement method memo
java anything memo
Java Silver memo
For JAVA learning (2018-03-16-01)
Java learning day 5
java, maven memo
Java8 method reference
[Java Bronze] Learning memo (interface, static method, type conversion, etc.)
Java SE 7 memo
[Java] forEach method
java anything memo 2
java8 method reference
[Java] Random method
[Java] split method
Java specification memo
java learning day 2
Java pattern memo
java learning day 1
Directory change monitoring method memo (Java, Kotlin)
Ruby Learning # 30 Initialize Method
JAVA DB connection method
Java development environment memo
java learning (conditional expression)
java basic knowledge memo
Java Kuche Day memo
Ruby Learning # 24 Exponent Method
Java Learning (1)-Hello World
About Java method binding
About method splitting (Java)
java se 8 programmer Ⅰ memo
Java paid private memo
Studying Java 8 (see method)
Learning memo 01 (forward / redirect)
JAVA learning history interface
Java programming (class method)
[Java ~ Array ~] Study memo 4
java lambda expression memo
(Memo) Java for statement
[Qualification Exam] Java SE 8 Silver Learning Method Summary
Java lambda expression [memo]
[Java] Implicit inheritance memo