The lesson is so completed and very easy to understand. It also cover variety of important input/output file in Java. Thank you John so much, and looking forward to receive more lessons like this in the future.
that vd u set apart is genuinely flamboyantly sophisticated and beneficial and but as I'm just a beginner it absolutely dawned on me being too intoxicated and carriedaway but I'm sure I'm about to become more proficient and flexible in java
I will suggest doing that count caparison in a method. Doing so will allow you to return with false when word cannot be made, instead of using a break.
greadt video. exactly what I was looking for ! Except I searched for a solution in c#, but I think it will be easy to do in c#. question: how many words do your dictionary have? Does the code work fast with more than 2millin words in the dictionary?
Thanks! C# will be pretty similar, just with a handful of syntax changes. The idea should be the same. This dictionary has 178,691 words. As long as you use a fast class for your file IO (like the BufferedReader we use here), a 2-million word dictionary should be no problem at all. There are certainly larger dictionaries out there that you can find, but I found that they started including really ridiculous words. Even this dictionary has some weird ones, but I thought it was a good balance.
Question: when you use the for loop to read the current line, and then use the same method to increment the loop, it seems like it would end up working like this: loop reads line 1, incrementer reads line 2, loop starts again and reads line 3, incrementer reads line 4...etc. And then if this was the case, some lines would end up being read but not go through the logic of checking them against the user's word. I am guessing this isn't the case, but I'm having a hard time understanding how this doesn't end up having some lines be read but not go through the logic. Can anyone explain how this is working?
Thank you so much for all of this. I understood each step however when I try to redo it myself it doesn't work. BufferedReader, Filereader, etc don't change color and it says "illegal escape character", I have very basic understanding of how java works and I am not able to resolve this issue. If someone can help me it would be awesome!
My guess is that you may have run into a situation where somewhere inside of a string in your code, you're using a backslash character ("\"). Perhaps when you're defining your file path or something. Well, in Java strings, the "\" is a very special character called the "escape" character. There are a few patterns where you can use "\" to define certain things, such as " " for a newline, or \t for a tab. However, if you just have a "\" by itself, Java thinks you're trying to use one of those special escape codes. And if the text afterward isn't actually a valid escape code, like , \t, or a few others (which can be found under the "Escape Sequences" section here: docs.oracle.com/javase/tutorial/java/data/characters.html), you get the error you're seeing. If you really want to actually use the "\" character though, like in your file path or somewhere else, you actually have to escape that character. So it looks a little weird, but you actually have to put "\\" whenever you want one backslash. Check out this StackOverflow page for an example. stackoverflow.com/questions/35237697/error-illegal-escape-character-when-trying-to-create-a-path If you're still having problems, feel free to paste your code in here and we can take a look!
@@CodingWithJohn please do. You actually were helpful with the json files even though you couldn’t help with android. I like your videos and your comments
The lesson is so completed and very easy to understand. It also cover variety of important input/output file in Java. Thank you John so much, and looking forward to receive more lessons like this in the future.
that vd u set apart is genuinely flamboyantly sophisticated and beneficial and but as I'm just a beginner it absolutely dawned on me being too intoxicated and carriedaway
but I'm sure I'm about to become more proficient and flexible in java
I will suggest doing that count caparison in a method. Doing so will allow you to return with false when word cannot be made, instead of using a break.
Thank you John, you saved us for our project
I love you more than my mother
😵💫
Awesome John! Thanks for the Video
Super explanation John
WOW, very nice explanation. Thank you so much for your hard work. God Bless
thanks for these kind of videos, I learned a lot
Very helpful video John
thanx for the video john!
Really don't understand how you don't have WAY more views on your Vids.
greadt video. exactly what I was looking for ! Except I searched for a solution in c#, but I think it will be easy to do in c#.
question: how many words do your dictionary have? Does the code work fast with more than 2millin words in the dictionary?
Thanks! C# will be pretty similar, just with a handful of syntax changes. The idea should be the same.
This dictionary has 178,691 words. As long as you use a fast class for your file IO (like the BufferedReader we use here), a 2-million word dictionary should be no problem at all.
There are certainly larger dictionaries out there that you can find, but I found that they started including really ridiculous words. Even this dictionary has some weird ones, but I thought it was a good balance.
Thank you John !!
Question: when you use the for loop to read the current line, and then use the same method to increment the loop, it seems like it would end up working like this: loop reads line 1, incrementer reads line 2, loop starts again and reads line 3, incrementer reads line 4...etc. And then if this was the case, some lines would end up being read but not go through the logic of checking them against the user's word.
I am guessing this isn't the case, but I'm having a hard time understanding how this doesn't end up having some lines be read but not go through the logic. Can anyone explain how this is working?
Loop reads Line 1
Increment to Line 2
Loop starts
Reads Line 2
Increment to Line 3
Loop starts
Reads Line 3
Increment to Line 4
And so on..
is there a way of getting longest words on top when u do search??.
great video by the way.
Wtf you are really good in teaching ♥️ love from an indian!
Thank you so much for all of this. I understood each step however when I try to redo it myself it doesn't work. BufferedReader, Filereader, etc don't change color and it says "illegal escape character", I have very basic understanding of how java works and I am not able to resolve this issue. If someone can help me it would be awesome!
My guess is that you may have run into a situation where somewhere inside of a string in your code, you're using a backslash character ("\"). Perhaps when you're defining your file path or something.
Well, in Java strings, the "\" is a very special character called the "escape" character. There are a few patterns where you can use "\" to define certain things, such as "
" for a newline, or \t for a tab. However, if you just have a "\" by itself, Java thinks you're trying to use one of those special escape codes. And if the text afterward isn't actually a valid escape code, like
, \t, or a few others (which can be found under the "Escape Sequences" section here: docs.oracle.com/javase/tutorial/java/data/characters.html), you get the error you're seeing.
If you really want to actually use the "\" character though, like in your file path or somewhere else, you actually have to escape that character. So it looks a little weird, but you actually have to put "\\" whenever you want one backslash. Check out this StackOverflow page for an example.
stackoverflow.com/questions/35237697/error-illegal-escape-character-when-trying-to-create-a-path
If you're still having problems, feel free to paste your code in here and we can take a look!
@@CodingWithJohn thank you very much, it's really helpful !
did u get it in the meantime?..took me ages but i got it in the end.
Thanks John
Need help for guessing game phrases using buffered reader
Hi Relax - that's pretty vague, can you explain the specific problem you're running into?
@@CodingWithJohn I can't put any input in my code
zajebisty tutorial, essa
I am wondering if you did a more in-depth video on map
Could be a good idea - Maps are relatively simple but I do hear about them causing a good bit of confusion.
@@CodingWithJohn please do. You actually were helpful with the json files even though you couldn’t help with android. I like your videos and your comments
You are calling "scanner.close()" and "reader.close()" inside the 'for' loop so there is an error. Anyway, thanks to your video, I learned a lot 😊
When I add a pool of letters I get all the words. What could that be?
you're getting the full dictionary u mean?...
DSA please
great !!!
In Argentina we call soja to soy.
🖤
i slept (