URL test = null;
String inputLine = null;
BufferedReader in = null;
try {
test = new URL("http://localhost/out.php"); // if connection down
} catch (MalformedURLException e) {
inputLine = "test_synntax";
}
try {
in = new BufferedReader(new InputStreamReader(test.openStream()));
...
如何,如果默認的URL解析失敗 在好日子指定默認值
問題你不清楚你要做什麼嗎? –
並請形成適當的問題標題。 –
你在做什麼樣的工作呢? – PermGenError