MCPcopy Create free account
hub / github.com/Manvityagi/PW-Skills-Java-Course-Codes / ReadChar

Class ReadChar

Lecture 04_Java_Input/src/ReadChar.java:3–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1import java.util.Scanner;
2
3public class ReadChar {
4 public static void main(String[] args) {
5 Scanner sc = new Scanner(System.in);
6
7 System.out.println("Enter a character");
8 char ch = sc.next().charAt(0);
9 System.out.println("Character is: " + ch);
10
11 }
12}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected