java SimpleDateFormat 的parse(String text,ParsePosition pos) 方法

这个方法到底是干嘛的?怎么用?

pos = new ParsePosition(8)

知道是解析时间,但是pos的作用是什么

阅读 6.8k
1 个回答

The method attempts to parse text starting at the index given by pos.
就是类似先把给的字符串从ParsePosition对象的index开始截取,然后对截取的字符串parse

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题