首先,我们有PrintWriter
java.io.File f=new java.io.File("s.txt");
   java.io.PrintWriter out=new java.io.PrintWriter(f);
   out.print(5);
   out.print(7);
   out.close();
Run Code Online (Sandbox Code Playgroud)
然后我们有输出流
 java.io.File f=new java.io.File("s.txt");
 java.io.FileOutputStream out=new java.io.FileOutputStream(f);
   out.write(5);
   out.write(7);
   out.close();
Run Code Online (Sandbox Code Playgroud)
有什么不同?
我想提取的HTML页面(S),其放置在文本p和li标签,这样我就可以开始来标记页面构造为每个页面反向索引(ES)为了回答搜索查询.
我如何p使用jsoup 获取标签
Elements e = doc.select(""); 
Run Code Online (Sandbox Code Playgroud)
可能是该参数中要写的字符串是什么?
我有一个像这样的语句,给出一个错误"缺少返回语句".但我已经分配了返回语句,如你所见.错了吗?
public int compareTo (Object o)
{
    try 
      {
          Sports m = (Sports)o;
          if(this.date.before(m.date)&& o instanceof x)
          {
             return -1;
          }
          else if(this.date.equals(m.date)&& o instanceof x)
          {
            return 0;
          }
          else
          { 
            return 1;
          }
    }
    catch(IllegalArgumentException e) 
    {
        System.out.print("Not an instance of x class");
    }
}
Run Code Online (Sandbox Code Playgroud)