javaÓÐÒ»¸öСÎÊÌâ
ÎÒ³õѧjava
±à³ÌÌ⣺
ÒªÇó´ò¿ªÒ»¸öÎļþ£¬Ò»´Î¶ÁÈ¡ÆäÄÚµÄÒ»ÐÐÎı¾£¬ÁîÿһÐÐÐγÉÒ»¸öString,²¢½«¶Á³öµÄString¶ÔÏóÒÔÏà·´µÄ´ÎÐò´æ´¢ÔÚtest.txtÎļþÖС£
public static int test() {
Scanner s = null;
try {
s = new Scanner(new File("d:\\ApplicationResources_zh_CN.txt"));
List <String> list = new ArrayList <String>();
FileWriter fw = new FileWriter(new File("d:\\test.txt"),true);
while(s.hasNext()) {
String copy = s.nextLine();
System.out.println(copy);
list.add(copy);
}
System.out.println("-----------------------------");
for(int i=list.size()-1;i>0;i--)
{
fw.write(list.get(i)+"\n");
}
fw.close();
System.out.println("over");
return 0;
}catch(Exception e) {
e.printStackTrace();
return 1;
}finally{
s.close();
}
}
ÊÇÎļþ¹¤³§Ã´
¸ù±¾ÎÞ·¨ÔËÐУ¡£¡
Java code:
import java.io.*;
import java.util.*;
class zhenfan
{
static private final String newline = "\n";
public static void main(String[] args)
{
BufferedReader br =null;
PrintWriter pw=null;
String p
Ïà¹ØÎÊ´ð£º
import java.util.*;
class Tiger{}
public class P378 {
public static void main(String[] args) {
//Ϊʲô¿ÉÒÔÕâô×ö
List<String> ls=new Test1().makeArrayList(new Tiger());
}
}
clas ......
ÎÒÏ£ÍûÔÚ±à¼ÎÄ×Öºó°Ñ·¢Ëͼü¸Äµ½ÆÁÄ»Öм䣬¾ßÌå˵¾ÍÊÇ
ÔÚkb.classÖеIJ¿·Ö×÷³öÐÞ¸Ä
²¿·Ö´úÂ룺
V = new TextBox(ld.a(383), "", 190, 0);
X = new Comma ......
ÎÒÏÖÔÚÓÃstruts2¿ò¼Ü,ÐèҪʹÓÃajaxʵÏÖ¾Ö²¿Ë¢Ð£¬µ«ÊÇ´ÓÈÝÆ÷Àï·µ»ØµÄÖµ²»ÖªµÀÔõô´Óstruts.xmlÅäÖÃÎļþÀïÓ³Éäµ½jspÒ³ÃæÀÒÔǰservletÀïдout.orint("xxxxx")¾Í¿ÉÒԵõ½~£¬µ«ÊÇÏÖÔÚÓÃstruts¾Í²»ÖªµÀÔõôР......
Èý¸öÊýx,y,z ±È´óС..
var x,y,z,t;
if (x>y)
{t=x;x=y;y=t;} //½»»»x,yµÄÖµ
if(x>z)
{t=z;z=x;x=t;}//½»»»x,zµÄÖµ
if(y>z)
{t=y;y=z;z=t;}//½»»»z,yµÄÖµ
ÕâÊÇ ......