To accept a character using scanner class, the command should be
nextchar()
next().charAt(0)
next()
next.char()