EDIT Liste listemdeki değerlere sahip listemimŞimdi şimdi bu listeye fazladan değer eklemek istiyorum.Liste <File>'dan dosyaya yolunu bulup başka bir listeye koyma
Ve ben bu [günlüğünden değer] gibi liste var befor i yolunu almak ve i .getAbsolutePath kullanırsanız Alse kod eklemek gerekir bilmiyorum bu
private static List<String> listQuestionE(Scanner sc, List<File> listQuestion){
//List with value from List<File> listQuestion (its some value from .log files it doesn't matter
List<String> question = new ArrayList<String>();
//I think that I need to do something with File input1 but i try several things and it doesnt work for me.
for(File input1 : listaQuestion){
try {
sc = new Scanner(input1);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
while(sc.hasNextLine()){
s = new Scanner(sc.nextLine());
while(s.hasNext()){
String words = s.nextLine();
if(!getTagValues(words).isEmpty()){
try {
question.add(getTagValues(words).toString());
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
}
return question;
}
gibi Benim kod bakmak , [Yol] veya en kötü [], [Yol], çünkü bazen günlüğe kaydetme hatası olmadığından cevap boştur.
Kodda bu dosyayı kullanmak ister misiniz? Anlam çok açık değil. Lütfen soruyu net bir şekilde düzenleyin. –
Tamam, pardon ama burada ne sorduğun hakkında hiçbir fikrim yok. –
kodunuzu biçimlendirin ve sorularınız için lütfen –