Thank you Khushi. Enjoy the Power of Digital Learning....
@RishabhSaxena-k8g
9 ай бұрын
Excellent explanation sir
@SelfStudyTutorials
9 ай бұрын
Thanks and welcome. Keep watching. Planning to upload more Java tutorials for beginners soon.
@jakubagwa7131
2 жыл бұрын
super useful, thank you, liked the video
@SelfStudyTutorials
2 жыл бұрын
Glad to hear that! Thanks @Jakub Łągwa
@jitesharyan6736
3 жыл бұрын
Very Helpful !!! Thanks for your Effort in making this
@SelfStudyTutorials
3 жыл бұрын
Dear Jitesh, Glad it was helpful!
@janiceflores2002
3 жыл бұрын
Thanks for this! Big help
@SelfStudyTutorials
2 жыл бұрын
Glad it helped!
@jakhegiboys3855
Жыл бұрын
Sir please make videos on advance java concepts like jdbc, jsp etc
@SelfStudyTutorials
Жыл бұрын
Sure will do that soon. Keep watch on Java Playlist of the Channel.
@rammandal2389
2 жыл бұрын
Good Teaching keep it up
@SelfStudyTutorials
2 жыл бұрын
Thank you @Ram Mandal. Keep watching @SelfStudyTutorials for more updates.
@nibaverinekajock6835
Жыл бұрын
Hello sir great video!🥰 Please a question his do I backup a file?
@SelfStudyTutorials
Жыл бұрын
Dear Niba. Please elaborate more on your question. You can apply very similar logic to back up your data files.
@pruthvirajdodiya6650
3 жыл бұрын
very informative !
@SelfStudyTutorials
3 жыл бұрын
Thank you Pruthvi. I am happy to know that it is useful to you.
@madan-k5o
Жыл бұрын
Can you provide source code of "file management system" using java ?.sir please provide me!
@SelfStudyTutorials
Жыл бұрын
Dear Madan. You may like to explore following Java file Management Programs. Add required validations as per your project requirements. With best wishes, =============== /** Program 1: Objective of this program is to create a data file. */ package p1; import java.io.File; import java.io.IOException; /* @author Self Study Tutorials */ public class CreateFileDemo { public static void main(String[] args) { try { //File myFile = new File("d:\\javademo\\data1.txt"); //Code to specify full path. File myFile = new File("data1.txt"); if(myFile.createNewFile()){ System.out.println("New file created successfully."); } else{ System.out.println("File creation error."); } } catch (IOException e) { System.out.println("File Error..."); } } } /** Program 2: Objective of this program is to write data into a file. */ package p1; /* @author Self Study Tutorials */ import java.io.FileWriter; public class FileWriteDemo { public static void main(String args[]) { String data = "This is my sample data."; try { // Creates object of a FileWriter FileWriter output = new FileWriter("data1.txt"); output.write(data); // Writes data to the file System.out.println("Data is written successfully in file."); output.close(); // Closes the writer } catch (Exception e) { System.out.println("File write error."); } } } /** Program 3: Objective of this program is to read data from a file. */ package p1; /* @author Self Study Tutorials */ import java.io.FileReader; public class FileReadDemo { public static void main(String[] args) { char[] data = new char[100]; try { // Creates an object of FileReader FileReader input = new FileReader("data1.txt"); input.read(data); //Read data System.out.println("Data received from a file:"); System.out.println(data); //prints on output window input.close(); // Closes the reader } catch (Exception e) { System.out.println("File read error."); } } } /** Program 4: Objective of this program is to append data to a file. */ package p1; /* @author Self Study Tutorials */ import java.io.FileWriter; import java.io.IOException; public class FileAppendDemo { public static void main(String[] args) { try { String data = "This data is appended."; FileWriter output = new FileWriter("data1.txt", true); output.write(data); System.out.println("Data appended successfully in file."); output.close(); } catch (IOException e) { System.out.println("File append error."); } } }
@madan-k5o
Жыл бұрын
@@SelfStudyTutorials Thank you sir❤️
@SelfStudyTutorials
Жыл бұрын
Do share this channel with your friends and like this video. Let me know what kind of more videos you want to see on this channel.
@dineshn4794
3 жыл бұрын
Hi Sir, can you please let me know how to increment file name if file already exists? Thanks.
@SelfStudyTutorials
3 жыл бұрын
Dear Dinesh, Following logic will help you to resolve your issue: Important Note: -> int count variable helps us to increment a filename. -> Make sure you initialize count variable appropriately as per the last filename saved in your system. -> You can extract last number attached to your filename. ============= import java.io.File; import java.io.IOException; /* Java program to increment a file name. * @author Kuntal (Self Study Tutorials) */ public class FileNameIncrement { public static void main(String[] args) { int count=1; try { //Following statement will create data1.txt E:\ drive File myFile = new File("E:\\data"+ count++ + ".txt"); if (myFile.createNewFile()) { System.out.println("File created successfully."); } else { System.out.println("File creation error."); } myFile = new File("E:\\data"+ count++ + ".txt"); // Following logic creates "data2.txt" file in E: drive if (myFile.createNewFile()) { System.out.println("File created successfully."); } else { System.out.println("File creation error1."); } } catch (IOException ex) { System.out.println("File error..."); } } }
@AmanThakur-yf7uu
2 жыл бұрын
good video as information
@SelfStudyTutorials
2 жыл бұрын
Glad you think so! @AmanThakur. Enjoy @SelfStudyTutorials
@brianataylor406
Жыл бұрын
For some reason I can't search and save a file in the menu... it just throws an exception sigh
@SelfStudyTutorials
Жыл бұрын
Please share your software environment details so that we can guide you accordingly.
@freyja8849
2 жыл бұрын
hi sir. Do you know how to delete a data from the file? like I only want to delete a specific data but not the entire file
@SelfStudyTutorials
2 жыл бұрын
Dear Freyja, One of the logic to delete a word from a text file is as under: -> Read data from Input file word by word -> Copy each word into Temporary file, except the word which you want to delete. -> Finally copy all the content from Temporary file into original Input file. This is one of the logic to delete the content from a text file. I will try to upload video tutorial for this activity soon... Enjoy...Self Study Tutorials!!! LIKE SHARE SUBSCRIBE.... With best wishes,
@ABC-zv1sd
2 жыл бұрын
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
@SelfStudyTutorials
2 жыл бұрын
Dear ABC, Resolving your query will take some time as we are not expert in Android.
@janiceflores2002
3 жыл бұрын
Subscribed :)
@SelfStudyTutorials
2 жыл бұрын
Thanks
@huidrompunendrajitsingh1758
3 жыл бұрын
nice video
@SelfStudyTutorials
3 жыл бұрын
Thanks for the visit Huidrom..Enjoy Self Study Tutorials....
Пікірлер: 42