import java.io.*;
import java.util.*;class p1
{
public static void main(String[] args)
{
try
{
LinkedList l=new LinkedList();
BufferedReader br=new BufferedReader(new InputStreamReader(new FileInputStream("p1.java")));
DataOutputStream dos=new DataOutputStream(new FileOutputStream("pp.java"));
String str;
Object o;
while((str=br.readLine())!=null)
{
l.add(str);
}
int i=1;
while ((o=l.removeLast())!=null)
{
System.out.println((String)o);
dos.writeBytes(i+" "+(String)o+"\n");
i++;
} }
catch (Exception e)
{
} }
}
import java.util.*;class p1
{
public static void main(String[] args)
{
try
{
LinkedList l=new LinkedList();
BufferedReader br=new BufferedReader(new InputStreamReader(new FileInputStream("p1.java")));
DataOutputStream dos=new DataOutputStream(new FileOutputStream("pp.java"));
String str;
Object o;
while((str=br.readLine())!=null)
{
l.add(str);
}
int i=1;
while ((o=l.removeLast())!=null)
{
System.out.println((String)o);
dos.writeBytes(i+" "+(String)o+"\n");
i++;
} }
catch (Exception e)
{
} }
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货