Skip to content

Commit 3fad8d5

Browse files
authored
Java Program - Print Character
1 parent 1a05544 commit 3fad8d5

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

Test11_print_char.java

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.test.Basic_Java_Programs;
2+
3+
import java.util.Scanner;
4+
5+
public class Test11_print_char
6+
{
7+
public static void main(String[] args)
8+
{
9+
char ch;
10+
11+
System.out.print("Enter Character : ");
12+
13+
Scanner sc = new Scanner(System.in);
14+
15+
ch = sc.next().charAt(0);
16+
17+
System.out.println("You Enter this Character : " + ch);
18+
19+
}
20+
21+
}
22+
23+
24+
/* Output:
25+
26+
Enter Character : M
27+
You Enter this Character : M
28+
29+
30+
*/

0 commit comments

Comments
 (0)