import java.util.Scanner;
Scanner scanner=new Scanner();
char sex=scanner.next().charAt(0);
Read More:
- Getting started with jmu-java-m01-scanner
- How to Fix char cannot be dereferenced Error
- How to Solve mybatis returns null when querying Oracle database with char type field
- Failed to convert value of type ‘java.lang.String‘ to required type ‘java.util.Date‘;
- The @ Autowired annotation in springboot is invalid in ordinary classes. How to solve and use the null pointer exception java.lang.nullpointerexception
- The use of Chinese characters in Qt and the solution to the “error C2001: newline in constant” problem
- Solve the problem of using logback console to print log Chinese characters in IDEA as garbled characters
- Java – how to shuffle an ArrayList
- MalformedJsonException:Use JsonReader.setLenient(true) to accept malformed JSON at line 3 colum
- Gson Parsing exceptions: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
- How to receive localdatetime type in background
- The solution of “double quotation marks become escape characters” in Java parsing JSON
- No converter found capable of converting from type [java.lang.String] to type [java.util.Map<java.la
- Use jstack to output the stack information in Java process to the specified file and analyze it
- Remove spaces after characters in Excel cells
- Java 8 Stream – Read a file line by line
- How to exit jshell in Java?
- Regular error in UDF java.lang.stackoverflowerror
- Failed to enable APR appears when the cmder of ubutun system in win subsystem installs Apache_ TCP_ DEFER_ ACCEPT
- How to solve the problem of artifact contains illegal characters when creating springboot project with idea