import java.io.*; import java.util.StringTokenizer; public class text{ public static void main(String argumendid[]){ String failinimi=("laused.txt"); File fail=new File(failinimi); StringTokenizer st; String sona; int max=0; int viit=0; int i=0; int a=0; String lause[]=new String[100]; try{ BufferedReader sisse=new BufferedReader(new FileReader(fail)); String rida=sisse.readLine(); while(rida!=null){ st=new StringTokenizer(rida, " "); while(st.hasMoreTokens()){ sona=st.nextToken(); lause[a]=sona; i++; a++; if (sona.endsWith(".")){ if (i>max){ max=i; viit=a; } i=0; } } rida=sisse.readLine(); } }catch (Exception viga){} for (int f=viit-max; f