Hi all!
Im preparing the OCP certification exam and i made this piece of code just to check how it works some of the elements i have to study.
When i execute the code it prints me the following names of the files i have in the path:
C:\Users\Javier\workspace\OCP_3_2_Paths
C:\Users\Javier\workspace\OCP_3_2_Paths
C:\
.classpath
.project
org.eclipse.jdt.core.prefs
File01.txt
File02
CreatingPaths.class
FileOCP01.txt
FileOCP02
Visitor.class
Eliminar.txt
Paths.txt
File01.txt
File02
CreatingPaths.java
FileOCP01.txt
FileOCP02
Visitor.java
temp
The problem is that the code should delete me the files what end in ".txt" but actually it doesnt do anything. When i reach
with "File01.txt", for example, the if returns me a FALSE.
Can you help me, please? thank you in advance!