0 likes | 10 Views
The method means a block of code that executes when we call.It describes the behaviour or logic of an object.
E N D
Java-Methods What is Methods in JAVA?
Overview The method means a block of code that executes when we call. It describes the behaviour or logic of an object. It is a Java convention that the method name should be in camelCase format (i.e. method_Name ). It enhances the readability and reusability of a program. The most common method used in Java is the main() method where the compiler starts compiling.
Program public class Main { public static void main(String[] args) { String name = "Quipo House"; message(name); } static void message(String name) { System.out.println(name); } }