JAVA TIPS
J1_Chen
这个作者很懒,什么都没留下…
展开
-
Java && ||
我先写在这里以免自己老是忘记。1、&&是且2、||是或3、在if 判断的括号里面:if(n&2==1){...} else(2<n<6){...}//错误 else(2<n%%n<6){...}//正确原创 2017-03-05 19:41:16 · 226 阅读 · 0 评论 -
Java Stdin and Stdout II
Note: If you use the nextLine() method immediately following the nextInt() method, recall that nextInt() reads integer tokens; because of this, the last newline character for that line of integer input原创 2017-03-05 19:45:43 · 662 阅读 · 0 评论 -
Java Output Format
Note:这些内容都是来自hackerrank的题目笔记和讨论区。先看这道题的解法:import java.util.Scanner;public class Solution {public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println(原创 2017-03-06 22:13:32 · 345 阅读 · 0 评论