📄 test.java
字号:
package zd.bbs;
import java.util.Iterator;
import java.util.List;
public class test{
public static void main(String args[]){
List all=null;
try{
all= DAOFactory.getNoteDAOInstance().dd_queryByLike("08报业年会",1);
}catch(Exception e){};
//System.out.println(all);
Iterator iter = all.iterator() ;
while(iter.hasNext())
{
Note note = (Note)iter.next() ;
//i++ ;
// 进行循环打印,打印出所有的内容,以表格形式
// 从数据库中取出内容
int news_id=note.getNews_id();
String news_title = note.getNews_title() ;
String news_date=note.getNews_date().substring(0,10);
news_title = news_title.replaceAll("08报业年会", "<font color=\"red\">"+ "08报业年会" +"</font>");
System.out.println(news_title);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -