Add a fname
parameter of type String
to myMethod
, and output "John Doe".
static void myMethod(@(6) @(5)) {
System.out.println(@(5) + " Doe");
}
public static void main(String[] args) {
myMethod("John");
}
static void myMethod(String fname) {
System.out.println(fname + " Doe");
}
public static void main(String[] args) {
myMethod("John");
}