📄 main.java
字号:
import java.io.IOException;import java.net.*;class Main { public static void main(String[] args) { URL.setURLStreamHandlerFactory(new TestFactory()); String host = "localhost"; if (args.length > 0) host = args[0]; try { URL u = new URL("date://" + host); Object content = u.getContent(); if (content != null) { System.out.println("class: " + content.getClass()); System.out.println("obj: " + content); } } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -