Computer Science, asked by narendrasinghcm, 7 months ago

write dowm the syntax to input a character through the scanner class with an example.
plz answer it fast​

Answers

Answered by rachnagupt406
3

Explanation:

import java.util.*;

class character

{

public void main()

{

Scanner Sc= new Scanner(System.in);

system.out.println("enter a character");

char ch= sc.next();

system.out.println("character is="+ch);

}

}

Similar questions