【Java】Scanner

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面试大全

image.png

后端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核心知识整理

本文已被CODING开源项目:【一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码】收录

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值