Comment by Federico klez Culloca on Why Stream toMap() key can't be duplicate...
Because nothing says that toMap returns a HashMap specifically, so why would you expect it to abide by the same rule as HashMap specifically?
View ArticleComment by Federico klez Culloca on How do I add hours if my string is...
Convert to LocalDate (plenty of questions on stackoverflow on how to do that), add the 8 hours (with the plus method), convert back to string (plenty of questions as well).
View ArticleComment by Federico klez Culloca on Blogger gadget for Featured Posts
Hello and welcome. You forgot to ask a question. Please be sure to read How to Ask
View ArticleComment by Federico klez Culloca on HI Devs recently i contested in Techgig...
Please [edit] your question to include a minimal reproducible example so that readers can run your code to answer your question.
View ArticleComment by Federico klez Culloca on How to understand how StackTraceElement...
Because the stack gets populated at runtime. If you checked the stack trace in main how would the runtime know what will happen in the method chain? How would it know, for example, that method1 will...
View ArticleComment by Federico klez Culloca on How to know if element exists in HashMap
May depend on what happens then if the element is not there.
View ArticleComment by Federico klez Culloca on The Y2Enum problem in Java: Should Java...
This does not offer an answer to the main question, though, that is "how to handle new enums from outside libraries that make your switch expressions non-exhaustive?"
View ArticleComment by Federico klez Culloca on unable to fill an array with numbers from...
double[] numbers = new double[n]; what's the value of n at the point of this declaration? Hint: it can't possibly be the one you read from the user because the array has already been instantiated when...
View ArticleComment by Federico klez Culloca on How to convert following java code into dart
And your question is...? Before you ask "how do I do that?" please clarify what specific part of this piece of code you are having trouble with and ask about that instead.
View ArticleComment by Federico klez Culloca on To modify the array so that all zeros are...
If your solution is already working you may have better luck on codereview.stackexchange.com but be sure to read their rules before posting there
View ArticleComment by Federico klez Culloca on How to change Intelli-J theme back to...
I removed unrelated tags and made the title more appropriate.
View ArticleComment by Federico klez Culloca on Return type of a method in java and why...
@user22873067 because every Book is an Object, but not every Object is a Book.
View ArticleComment by Federico klez Culloca on Why it gives zero in vs code and Intellij...
Looks like intellij is passing some parameters when running your class and vscode isn't.
View ArticleComment by Federico klez Culloca on Incorrect Syntax near ',' in Sql query...
FYI you can enable query logging and see what the query is.
View ArticleComment by Federico klez Culloca on Reproduce a command shell in Java
You mean "how to sign a string and encode the result in base64"?
View ArticleComment by Federico klez Culloca on How to Prevent Exceeding Overdraft Limit...
Uhm... this is working on my machine. The second withdrawal doesn't happen and the balance stays -100
View ArticleAnswer by Federico klez Culloca for Need to understand map.get() method after...
HashMap's getchecks for equality with == before using equals.So the fact that you're using the same object you used as a key (rather than an object with the same content but a different reference)...
View ArticleComment by Federico klez Culloca on Which way should slashes be?
If you're reading that string from a file it should be fine as is. Of course if that file had the same content on a *nix system it wouldn't work because there's no C: in *nix systems.
View ArticleComment by Federico klez Culloca on How can I clear cache when I open my app...
Why check if the cache is empty? Just empty it. If it's already empty nothing will happen.
View ArticleComment by Federico klez Culloca on How can I clear cache when I open my app...
@Agasthi it's mentioned in a comment in the linked duplicate. Short answer: no.
View Article