![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JAVA 学习
birdhappily
这个作者很懒,什么都没留下…
展开
-
使用扫描器Scanner读取输入流
package demo; import java.util.Scanner; public class Identification { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("输入身份证号");...原创 2018-11-15 20:35:50 · 375 阅读 · 0 评论 -
判断某年是否是闰年
判断某年是否是闰年 import java.util.Scanner; public class LeapYear{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); System.out.println("请输入一个年份: "); ...原创 2018-11-14 21:10:42 · 1954 阅读 · 0 评论 -
Car ----extend
package demo; public abstract class Car { public abstract String getCarInfo(); } package demo; public class BMW extends Car { @Override public java.lang.String getCarInfo() { retu...原创 2018-11-20 20:28:17 · 110 阅读 · 0 评论 -
新员工匹配部门
package demo; import java.util.Scanner; public class ScanAndSwitch { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("输入新员工姓名");...原创 2018-11-16 21:22:29 · 225 阅读 · 0 评论 -
Get HostName And HostAddress
package demo; import java.net.InetAddress; public class LocalHostAddressName { public static void main(String[] args) throws Exception{ InetAddress inetAddr = InetAddress.getLocalHost(); ...原创 2018-11-21 20:55:50 · 334 阅读 · 0 评论 -
HanoiTower
package demo; public class HanoiTower { public static void moveDish(int level,char from, char inter,char to){ if(level == 1){ System.out.println("从" + from + "移动盘子一号到" + to); ...原创 2018-11-19 21:22:25 · 221 阅读 · 0 评论 -
通过IP获取主机名
package demo; import java.net.InetAddress; public class GetHostInlfoWithIp { public static void main(String[] args) throws Exception{ String ip = ""; //填入ip...原创 2018-11-22 21:59:17 · 3103 阅读 · 0 评论 -
RedirctOutputStream
package demo; import java.io.PrintStream; import java.io.FileNotFoundException; public class RedirctOutputStream { public static void main(String[] args) { try{ PrintStream ou...原创 2018-11-17 21:32:39 · 124 阅读 · 0 评论