Skip to content

Instantly share code, notes, and snippets.

@alexejVasko
Created February 15, 2016 15:01
Show Gist options
  • Save alexejVasko/ce70873eeebbfb443d5d to your computer and use it in GitHub Desktop.
Save alexejVasko/ce70873eeebbfb443d5d to your computer and use it in GitHub Desktop.
package method;
import java.util.Scanner;
public class MethodHi {
public static void main(String[] args) {
hello();
}
static void hello(){
Scanner name = new Scanner(System.in);
String main = name.nextLine();
System.out.println("Hello "+ main);
}
}
@liuiv15
Copy link

liuiv15 commented Feb 16, 2016

Согласно заданию метод должен иметь параметры. И никакого сканера не применять.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment