private CharBuffer buf;
// Size of internal character buffer
private static final int BUFFER_SIZE = 1024; // change to 1024;
// The index into the buffer currently held by the Scanner
private int position;
// Internal matcher used for finding delimiters
private Matcher matcher;
// Pattern used to delimit tokens
private Pattern delimPattern;
// Pattern found in last hasNext operation
private Pattern hasNextPattern;
// Position after last hasNext operation
private int hasNextPosition;
// Result after last hasNext operation
private String hasNextResult;
// The input source
private Readable source;
// Boolean is true if source is done
private boolean sourceClosed = false;
// Boolean indicating more input is required
private boolean needInput = false;
// Boolean indicating if a delim has been skipped this operation
private boolean skipped = false;
// A store of a position that the scanner may fall back to
private int savedScannerPosition = -1;
// A cache of the last primitive type scanned
private Object typeCache = null;
// Boolean indicating if a match result is available
private boolean matchValid = false;
// Boolean indicating if this scanner has been closed
private boolean closed = false;
// The current radix used by this scanner
private int radix = 10;
// The default radix for this scanner
private int defaultRadix = 10;
// The locale used by this scanner
private Locale locale = null;
// A cache of the last few recently used Patterns
private PatternLRUCache patternCache = new PatternLRUCache(7);
// A holder of the last IOException encountered
private IOException lastException;
// Number of times this scanner’s state has been modified.
// Generally incremented on most public APIs and checked
// within spliterator implementations.
int modCount;
// A pattern for java whitespace
private static Pattern WHITESPACE_PATTERN = Pattern.compile(
“\p{javaWhitespace}+”);
// A pattern for any token
private static Pattern FIND_ANY_PATTERN = Pattern.compile(“(?s).*”);
// A pattern for non-ASCII digits
private static Pattern NON_ASCII_DIGIT = Pattern.compile(
“[\p{javaDigit}&&[^0-9]]”);
// Fields and methods to support scanning primitive types
/**
- Locale dependent values used to scan numbers
*/
private String groupSeparator = “\,”;
private String decimalSeparator = “\.”;
总结
以上是字节二面的一些问题,面完之后其实挺后悔的,没有提前把各个知识点都复习到位。现在重新好好复习手上的面试大全资料(含JAVA、MySQL、算法、Redis、JVM、架构、中间件、RabbitMQ、设计模式、Spring等),现在起闭关修炼半个月,争取早日上岸!!!
下面给大家分享下我的面试大全资料
- 第一份是我的后端JAVA面试大全
后端JAVA面试大全
- 第二份是MySQL+Redis学习笔记+算法+JVM+JAVA核心知识整理
MySQL+Redis学习笔记算法+JVM+JAVA核心知识整理
- 第三份是Spring全家桶资料
MySQL+Redis学习笔记算法+JVM+JAVA核心知识整理
AVA核心知识整理
[外链图片转存中…(img-KTHI6zTT-1714498029763)]
MySQL+Redis学习笔记算法+JVM+JAVA核心知识整理
- 第三份是Spring全家桶资料
[外链图片转存中…(img-FW2nTbVv-1714498029763)]
MySQL+Redis学习笔记算法+JVM+JAVA核心知识整理