Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Plain Text by lololol ( 11 years ago )
public int[][] tablica () throws FileNotFoundException
        {
            int kr = pobierzLiczbeWierszy("przecinek.txt");
            tabl = new int[kr][2];
            
            File plik1=new File("przecinek.txt");
            Scanner odczyt = new Scanner(plik1);
            for (int i=0; i<kr; i++)
            {
            
                    StringTokenizer punkt=new StringTokenizer(odczyt.nextLine(),",");
                        for (int j=0; j<2; j++)
                        {
                            String b = punkt.nextToken();
                            int a = Integer.parseInt(b);
                            tabl[i][j] = a;
                            if(tabl[i][j] >max)
                            max=tabl[i][j];
                        }     
            }
            odczyt.close();
            return tabl;
        }

 

Revise this Paste

Your Name: Code Language: