如何在特定方法中调用其他类的方法?
例
方法getItem1()
public String getItem1() throws UnsupportedEncodingException{
String a = "2";
a.getBytes();
a.getBytes("we");
System.out.println(a);
int t = Integer.parseInt(a);
return a;
}
Run Code Online (Sandbox Code Playgroud)
调用的方法getItem1()是:
String.getBytes()String.getBytes(String)PrintStream.println(String)Integer.parseInt(String)我需要title从html文件中提取段落(如StackOverflow).
我可以在Java中使用正则表达式来提取我需要的字段,但我必须decode获得所获得的字段.
例
字段提取:
Paging Lucene's search results (with **;** among **'** and **s**)
Run Code Online (Sandbox Code Playgroud)
解码后的字段:
Paging Lucene's search results
Run Code Online (Sandbox Code Playgroud)
java中是否有允许我转换这些html代码的类?