Java 정리 3
·
JAVA
Using methods : a method is a section of code to which we assign a specific task. ex ) class Main { public static void main(String[] args) { hello(); //Hello method is called } public static void hello() { System.out.println("Hello World"); } } Colored by Color Scripter cs If you define a method outside of a class, there will be an error. To call a method, just write methodName( ) An argument is..