•     JDK :OpenJDK-11
  •      OS :CentOS 7.6.1810
  •      IDE :Eclipse 2019‑03
  • typesetting :Markdown

code

package per.jizuiku.base;

import java.util.Scanner;

/**
* @author 给最苦
* @date 2019/06/29
* @blog www.cnblogs.com/jizuiku
*/
class Demo { /**
* @param args
*/
public static void main(String[] args) { Scanner sc = new Scanner(System.in); String myStr = sc.nextLine(); System.out.println("resut:" + myStr); sc.close();
}
}

result

hello world
resut:hello world

sourceCode

/**
* Advances this scanner past the current line and returns the input
* that was skipped.
*
* This method returns the rest of the current line, excluding any line
* separator at the end. The position is set to the beginning of the next
* line.
*
* <p>Since this method continues to search through the input looking
* for a line separator, it may buffer all of the input searching for
* the line to skip if no line separators are present.
*
* @return the line that was skipped
* @throws NoSuchElementException if no line was found
* @throws IllegalStateException if this scanner is closed
*/
public String nextLine() {
modCount++;
if (hasNextPattern == linePattern())
return getCachedResult();
clearCaches(); String result = findWithinHorizon(linePattern, 0);
if (result == null)
throw new NoSuchElementException("No line found");
MatchResult mr = this.match();
String lineSep = mr.group(1);
if (lineSep != null)
result = result.substring(0, result.length() - lineSep.length());
if (result == null)
throw new NoSuchElementException();
else
return result;
}

resource

  • [ JDK ] openjdk.java.net
  • [ doc - 参考 ] docs.oracle.com/en/java/javase/11
  • [ 规范 - 推荐 ] yq.aliyun.com/articles/69327
  • [ 规范 - 推荐 ] google.github.io/styleguide
  • [ 源码 ] hg.openjdk.java.net
  • [ OS ] www.centos.org
  • [ IDE ] www.eclipse.org/downloads/packages
  • [ 平台 ] www.cnblogs.com


感谢帮助过 给最苦 的人们。

Java、Groovy和Scala等基于JVM的语言,优秀,值得学习。

规范的命名和代码格式等,有助于沟通和理解。

JVM的配置、监控与优化,比较实用,值得学习。

最新文章

  1. 未解决的问题,登录163邮箱http://mail.163.com/,用xpath的方式定位密码输入框的时候,总是报找不到该元素
  2. 3G产品升级相关知识
  3. BZOJ3425 : Poi2013 Polarization
  4. Command设计模式
  5. 集成代码编辑器ACE的经验
  6. LaTeX排版工具使用
  7. iOS音频播放(二):AudioSession
  8. Linux中oops信息调试【转】
  9. Promise来控制JavaScript的异步执行
  10. logging日志——Basic Logging Tutorial
  11. Linux 遍历目录下面所有文件,将目录名、文件名转为小写
  12. bzoj5048: 塌陷的牧场
  13. Python中xlrd和xlwt模块使用方法
  14. cdn是否缓存了网站内容,如何查看
  15. 用flock命令解决Linux计划任务重复执行
  16. HTTPS双向认证+USB硬件加密锁(加密狗)配置
  17. 极限编程核心价值:勇气(Courage)
  18. MP实战系列(十五)之执行分析插件
  19. Django model中的Class Meta
  20. Wireshark分析RabbitMQ

热门文章

  1. linux系统编程之文件与io(一)
  2. 【转】Http和Https下的cookie的写入问题
  3. 样条函数后续(java)--可在hive中执行的函数
  4. ubuntu apache2.4.7配置白名单
  5. 十三.Java使用Protobuf3
  6. 解决SQL Error: 0, SQLState: S1009,Invalid value for getLong() - &#39;XX&#39;的问题
  7. CF1106F Lunar New Year and a Recursive Sequence——矩阵快速幂&amp;&amp;bsgs
  8. HDU - 4352 - XHXJ&#39;s LIS(数位DP)
  9. PostgreSQL 抛出错误信息(错误行号)
  10. PHP 鸟哥:我也曾经是“不适合”编程的人