-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDebugThree3.java
More file actions
23 lines (23 loc) · 564 Bytes
/
DebugThree3.java
File metadata and controls
23 lines (23 loc) · 564 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// This application gets a user's name and displays a greeting
import java.util.Scanner;
public class DebugThree3
{
public static void main(String args[])
{
String name;
getName();
displayGreeting(name);
}
public static String getName()
{
String name;
Scanner input = new Scanner(System.in);
System.out.print(Enter name );
name = input.nextInt();
return name;
}
public static void displayGreeting()
{
System.out.println("Hello, " + name + "!");
}
}