Комментарии:
Thank you!
ОтветитьLike, subscribe. Thanks!
ОтветитьThanks a lot!
Ответитьsheiii bro
ОтветитьThanks! Cramming and my prof didn't cover this topic :/
ОтветитьAwesome video, I love the way you explain new concepts
ОтветитьHello , i have a question please , i did all the instructions but it shows no file for some reason , why is that ?
Edit: its ok comments already answered that , keep the great work man
thanks
Ответитьthank you, you are the best : >
ОтветитьYo just wanna say that GOD loved the world so much he sent his only begotten
son Jesus to die a brutal death for us so that we can have eternal life
and we can all accept this amazing gift this by simply believing in him (Jesus) asking for the forgiveness of your sins
and forming a relationship with heavenly father.
Short N Sweet
ОтветитьThanks bro.
Ответитьyou are realy helpful bro. :)
ОтветитьKeep your text file outside your src folder incase if file.exists() always returns false...
Ответить😀
ОтветитьWhat a useful programming video, and by a person who actually talks english!
Amazing.
Thank you very much
Ответитьbeautiful work my lord
Ответить😇❤
Ответитьimport java.io.File;
public class Main
{
public static void main(String[] args){
File file = new File("song_lyrics.txt");
if(file.exists()){
System.out.println("That file exists! :O!");
System.out.println(file.getPath());
System.out.println(file.getAbsolutePath());
System.out.println(file.isFile());
file.delete();
}
else{
System.out.println("File does not exist");
}
}
}
So, as some people have already pointed out.
Sometimes you need to enter the complete path for the file.
You can see what that path is by right-clicking the file in the project tree and choose "Properties".
Then copy all of that and use it instead of just the file name.
If you're having trouble with the file path, run the following line of code to figure out what the current working directory is:
System.out.println("Working Directory = " + System.getProperty("user.dir"));
Then write the file path relative to the current working directory.
VSCode seems to set the current working directory to be whatever the Folder selected for the Workspace to be. The Workspace is the GUI (graphical user interface) with all the files/file directory.
.
ОтветитьHey you! I'm talking to youif you learn something new then you can help me, help you in 3 easy steps smash the like button ,drop a comment down below and subscribe I'd you'd like to become a fellow bro
Ответитьcome on bro we want spring framework and spring boot
Ответитьthanks very nice vid & explanation
ОтветитьAdd a public comment...
ОтветитьI do have a file but it won’t full the array
ОтветитьWatch now
Ответитьthakyou so much for the videos
Ответить"Please excuse the mess".
Me:*starts breathing heavily knowing I have over 50+ files on my desktop*
Don't we have to close the file afterwards?
Ответитьthanks! really well explained!
ОтветитьI don't quite understand the file.delete part. Shouldn't the program every time you start it create a file (File file = new File("poem.txt");) , so eventually only the first condition of if statement (file.exists()) would be fulfilled. I know the file gets deleted by the end, but with another start of the program it is created again. So like, why every other start of the program ignores the File file = new File(); line.
Ответитьnice video
ОтветитьIf I use the relative filename , the java can't find that txt file .
There are 3 solutions
1) type "src\\message.txt" or "src/message.txt" .
2) Change the eclipse working directory to the absolute pathname of the folder (src) that contains your packages and txt file .
By doing that , you can click section in top bar [Run] -> [Run Configurations] -> [Arguments] -> [Working directory] -> change from [Default] radio button to [Other] , enter your absolute pathname after [Other] -> [Apply] -> [Run]
3) type the absolute pathname .
Hello,
I am developing android java filemanager app.. I used checkbox to check 1/file.mp4
2/folder(files+sub folders)
.
How can i add copy paste feature for checked 1, 2 file folder fully at same time ?like -google filemanager app..
Advance Thanks
Thanks
Ответить(●'◡'●)
Ответитьاقسم بالله عظمة !!
ОтветитьNuclear launch codes 🤣 I had a good laugh now.
ОтветитьYou are just awesome 😎
ОтветитьThank you for all your work on these videos
Ответитьthanks bro
Ответитьyou are one of the best to the best
Ответитьhey bro can you paste the code in the comment
Ответитьnuclear launch codes... 💀💀💀💀💀💀
Ответитьlove the easter eggs
Ответить