import java.io.*; import java.util.*; public class konv{ public static void main(String args[]) throws IOException{ int i=0; String sonarida=""; String rida=""; String nimi=""; BufferedReader klaver=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Sisesta konverditava faili nimi: "); nimi=klaver.readLine(); BufferedReader lugeja=new BufferedReader(new FileReader(nimi)); PrintWriter fail=new PrintWriter(new FileWriter("leht.html")); LinkedList sonad=new LinkedList(); sonarida=lugeja.readLine(); while(sonarida!=null){ StringTokenizer stoken=new StringTokenizer(sonarida); while(stoken.hasMoreTokens()){ String tok=stoken.nextToken(); if(tok.startsWith("!!")){ sonad.add(tok); } } sonarida=lugeja.readLine(); } BufferedReader lugeja2=new BufferedReader(new FileReader(nimi)); fail.println("");fail.println("");fail.println(""+nimi+" ülesanne"); fail.println(""); fail.println(""); fail.println(""); System.out.println("Alustame konvertimist"); fail.println("
"); rida=lugeja2.readLine(); while(rida!=null){ StringTokenizer stoken=new StringTokenizer(rida); while(stoken.hasMoreTokens()){ String tok=stoken.nextToken(); if(tok.startsWith("!!")){ fail.print(""); }else{ fail.print(tok+" "); } } rida=lugeja2.readLine(); } fail.println("
"); fail.println(""); fail.println(""); fail.println("
"); fail.println(""); fail.println(""); fail.close(); System.out.println("Lõpetasime konvertimise"); } }