Reading from a CSV File and Searching for a Record in Java

preview_player
Показать описание
Reading from a CSV File and Searching for a Record in Java

Hello guys, I'm back with another file handling video and today we will be killing 2 birds with one stone by allowing the user to search for a record via reading the file, if it is found then tell the user the record details, if not found then tell them the record can't be found. This is in my opinion the hardest thing to dofor the As Practical exam but watch this video and practice in a couple of scenarios and you will be a pro. Thanks for being a great audience and we will see you next time!

Easter holidays are over but I will try to upload as often as possible. Why not subscribe to keep notified when I upload?

Social media:
Рекомендации по теме
Комментарии
Автор

great tutorial and detailed explanation for each line. I t helps me understand what everything is doing and what I need to do in a project ive got.
What did confuse me a little was when you explained the conditions of the while loop and said that !found means 'is found', but I eventually knew what you meant was that the while loop will continue until 'found' is found to be true. thank you again, glad I found your tutorials, Ive subscribed on just this vid, cheers mate.

alexeaton
Автор

I am a teacher and you file handling videos really helped me to teach my student.

AbhiAbhi-wusb
Автор

Thank you so much I implemented this for a button and it works so nice. the buttons reads, retrieves, adds to JTable and writes to another file

zabisidiqkhil
Автор

Great clear video!
If I wanted to add a list of items and move items from a file would this be the right approach? or would xml using JSP be better?
Thanks

Tony-ruwm
Автор

Great video ! You should replace your if(ID.equals(searchTerm)) { found = true; } by found = ID.equals(searchTerm); tho

MaxDProd
Автор

thank you so much! this really helped out a lot

caine
Автор

thanks a lot for the help! great content!

kokeb
Автор

Hello! How to make this into dynamic? I mean the user will input the search term into the console then it will display the result.

BalutPinoyTV
Автор

what if we want to search for the third element in the row and my program is only working on first row of file on further rows it is giving no such element found exception plss help....!!!!

safarnama
Автор

In the line of x = new scanner, I am getting error of differ in length, please help

mrinalkamble
Автор

Hello sir, i am getting false in x.hasNext, so my fn is not working...how should I proceed?

akanshyadash
Автор

Instead of writing a string in the searchterm what if i were to take that as user input? I am using system.in to take the input but idk what to do with it. Thanks

khisa
Автор

hey can you tell me how to use CSV parser ? for editing the csv files

adithyakowshik
Автор

I followed the tutorial and it continues to not work. I might need some help.

marial
Автор

for the filepath, did you drag the tutorial.txt into the project folder or did you get the filepath from where u had it stored in your computer since i keep getting an error?

ahmadalghizi
Автор

Is there any way to make this function more efficient if you are only checking for one value like in this example. Instead of going through each item, just check if one item in a row is equal. In other words do you have to write x.next(); to go through each value or could you skip some of the values? How would that impact the performance?
(I have to search through a large database with thousands of rows and around ten or so columns)

MrJona
Автор

what if instead of having 3 paramters in my text file i have 4 or 6 or 8, is there a way to make this have a lower coupling?

ahmadalghizi
Автор

Hi, do you know how we would do this in JavaFX? Thanks.

-bitJoe
Автор

Great Video! Just a quick question, what if the CSV file has headers, how do I parse through it without considering the catagories within the file? Thank You!

aadilmufti
Автор

Thumbs up guy was here, splendid clean explantation, nice job.
buy reading the comment here i should understand that your not a teacher and that shocks me because you reaaly sound like one.

alainsoral