Java Lesson 01: Basic method call

From Erlands Wiki

Jump to: navigation, search

You have this class:

public class MyClass {
    public static void main(String[] args) {
    }
 
    public static void printStuff(String data) {
        System.out.println("You specified: "+data);
    }
}

The program is executed as:

java MyClass Hello

Your work is to modify the main method so it uses the printStuff method to show this output:

You specified: Hello
Personal tools