Methods in Java


Methods are used to perform certain actions, and they are called functions in other programming languages.

Source Code

public static void printName(String name) {
    System.out.println("Hello " + name);
}
printName("Java");
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments