Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @author Dominik Tkalčec
- */
- package vjezba4;
- import java.io.File;
- public class Zad1 {
- public static void main(String[] args) {
- File mape = new File("E:\\Dokumenti");
- File[] lista = mape.listFiles();
- for (File i : lista){
- System.out.println(i.getName());
- }
- for (File i : lista){
- if((i.getName()).matches("(a|b|c|d|e|f|g|h|i|j|k|l|m|n).*")){
- System.out.println(i.getName().substring(0,1).toUpperCase()+i.getName().substring(1));
- }
- }
- for (File i : lista){
- if((i.getName()).matches("(o|p|r|q|r|s|t|u|v|w|x|y|z).*")){
- System.out.println(i.getName().toUpperCase());
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement