Tech Lead App Developer at BNY Mellon
I am a Software Engineer by profession, Learner and Blogger by passion. I love to talk and discuss with peoples so if you have anything good to read, watch, share or you just want to talk to me you can contact me anytime.
Stats
Reputation: | 2037 |
Pageviews: | 1.9M |
Articles: | 20 |
Comments: | 79 |
Comments
Jul 04, 2023 · Mike Gates
Thanks for sharing the information Simon
Jul 04, 2023 · Naresh Joshi
Thanks, Adam & Mike!
Jul 04, 2023 · Naresh Joshi
Thanks for sharing the information Alex!
Jan 15, 2022 · Lindsay Burk
Thanks, Yasin!
Jan 15, 2022 · Lindsay Burk
Thanks, Pouria!
Jan 15, 2022 · Lindsay Burk
We do not use it in day-to-day code and there but it is used for some of the things under the hood, It is better to know these things.
Jan 15, 2022 · Lindsay Burk
I agree with you Jhon, There are several approaches to do the same thing!
Jan 15, 2022 · Mike Gates
Thanks, Vaishnavi!
Oct 22, 2020 · Naresh Joshi
Thanks @Sanat
Oct 22, 2020 · Naresh Joshi
Thanks @Rahul
Sep 08, 2020 · Naresh Joshi
Thanks for checking it Mohan, I will update this.
Sep 08, 2020 · Naresh Joshi
Haha! Does not matter how much they try to deprecate it but it will be always there.
Sep 08, 2020 · Naresh Joshi
Yes, I agree!
Sep 08, 2020 · Naresh Joshi
Thanks for sharing it! @Esko
Sep 08, 2020 · Naresh Joshi
Yeah, I agree! Wrote that statement just to make the distinction.
Sep 08, 2020 · Naresh Joshi
Thanks @Gayatri
Sep 04, 2020 · Lindsay Burk
@Suxin Li Sorry for replying late, As mentioned it the article,
We know every
Child
class inherits variables and methods (state and behavior) from itsParent
class. Imagine if Java allows variable overriding and we change the type of a variable fromint
toObject
in theChild
class. It will break any method using that variable, and because the child has inherited those methods from theParent
, the compiler will give errors in theChild
class.It not just about what method returns, It is about what variable method is using,
Jan 19, 2020 · Alan Grau
Great details Alan! Thanks for sharing.
Oct 19, 2019 · Lindsay Burk
Thanks Amit.!
Sep 04, 2019 · Lindsay Burk
Thanks Amit!
Jul 22, 2019 · Duncan Brown
Thanks Divya!
Jul 16, 2019 · Mike Gates
Thanks Ravindra!
Jul 07, 2019 · Mike Gates
Thanks! @Atul
Jun 14, 2019 · James Sugrue
I am facing the same kind of integration problems with scala, gradle and intellij, If I compile the project through gradle it compiles successfully but intellij is not so intelligent to compile it.
May 30, 2019 · Lindsay Burk
Thanks for combining these features in one article, excited to see them.
Apr 16, 2019 · Lindsay Burk
Thanks for mentioning it @Ravi Hasija
Apr 08, 2019 · Lindsay Burk
Thanks @Raghavan!
Apr 08, 2019 · Lindsay Burk
As mentioned in the blog "Because SDKMan is written in bash and only requires curl and zip/unzip to be present on your system. You can install SDKMan on Windows as well either by first installing Cygwin or Git Bash for Windows environment and then installing SDKMan by running mentioned commands."
Apr 03, 2019 · Mike Gates
Hi Andreas! Thanks for mentioning, I was trying to focus on the concept only.
Apr 01, 2019 · Mike Gates
Thanks!
Feb 18, 2019 · Duncan Brown
Thanks Miten! Will do that in near future.
Feb 07, 2019 · Duncan Brown
Thanks Brian! I appreciate it!
Feb 05, 2019 · Duncan Brown
Thanks, Sunit! Thanks for your response!
Nov 16, 2018 · Lindsay Burk
Thanks Silvia!
Nov 16, 2018 · Lindsay Burk
Thanks!
Apr 03, 2018 · Mike Gates
Hi Ajitesh, Gcloud provides it for free or it costs?
Mar 26, 2018 · Duncan Brown
Nice article Eugen!, I am using streams for 2 years but was not aware of some methods discussed by here.
Mar 26, 2018 · Tony Tapper
Nice summary!
Feb 21, 2018 · Justin Albano
mention not.
Feb 21, 2018 · Justin Albano
Good article Justin, I was not aware of most of them. I also wanted to point out that static initializers get called when the class loads into the memory not when the application starts. This will happen if our class is getting loaded into memory during application start.
Feb 20, 2018 · Mike Gates
Thanks Denis!
Feb 06, 2018 · Mike Gates
Thanks, Effie, I can't help without seeing your code, you can complete code for this blog on https://github.com/njnareshjoshi/articles/tree/master/spring-data-jpa-auditing, tell me if this helps.
Feb 06, 2018 · Mike Gates
Yes you can
Aug 14, 2017 · Dulaj Atapattu
The link "Adroitlogic Project-X" is broken, can you please share some code or git repo.
Aug 04, 2017 · Mike Gates
Thanks, Anastasiia, Your research about hiring a Java devs is good.
Jul 12, 2017 · Mike Gates
Ohh my god, I think you are not in a good mood today and I know your time is very precious so don't waste your time in posting shit comments on a shit article and do something productive.
7000 more readers have read it and did not found it shit, you found it shit that's your perception, I thank you for telling me your perception.
By the way, I have not posted it on DZone and They have picked it and I am pretty sure they have done this for a good and productive reason.
Jul 12, 2017 · Mike Gates
Thanks a lot, Really nice to hear that at least you have something to say.
Jul 07, 2017 · Mike Gates
Yes, you are right but sometimes based on our requirements we need these kinds of things e.g. I have to do a lookup.
Jul 07, 2017 · Mike Gates
Totally agreed.
Jul 06, 2017 · Mike Gates
Thanks for mentioning, I was totally unaware of it.
Jun 15, 2017 · Mike Gates
Okay, thanks!!!
Jun 15, 2017 · Mike Gates
Good point
Jun 15, 2017 · Mike Gates
Having an opinion is good but forcing it on others is not. However, I accept what you are trying to say that novice programmers might get confused but chances are very less. Because anybody can see the code and can also see that the method is not static.
Jun 15, 2017 · Mike Gates
I don't want to get into a fight here but you are completely wrong here, I am not saying that we should always override it but we should when we are in need.
My whole purpose was to talk about override and overload not equals and hashCode and their contract.
And what are you trying to prove by saying "including the author." , First of all, this not something a professional says and it does not suite to a person who has this much experience. We should be a little bit polite and give respect to others.
And assuming what others don't know because of what you know is not a good idea.
Jun 15, 2017 · Mike Gates
Totally agreed.
Jun 15, 2017 · Mike Gates
Agreed We will not be overriding those methods always as I have not done in the example. But whenever we work on a real time project we should and it is good to implement those methods in your classes specially POJOs.
Jun 14, 2017 · Mike Gates
It is not required but we can use a different return type but must use different argument.
Jun 01, 2017 · Mike Gates
I apologize for your inconvenience but DZone Have picked it up from my blog, I have not posted it.
I am pretty sure that they have done it for some good reason.
May 29, 2017 · Mike Gates
Yes We can store all the request info as well e.g. headers, params, url, body etc.
May 28, 2017 · Mike Gates
Certainly, Hibernate Envers have an edge over JPA auditing. And actually, this article is the first in the 3 article long auditing series which I am working on next is https://programmingmitra.com/2017/02/automatic-jpa-auditing-persisting-audit-logs-automatically-using-entityListeners.html
And I am going to write the 3rd article which will be about hibernate-envers
May 28, 2017 · Duncan Brown
This conversation solved my confusion.
Feb 05, 2017 · Naresh Joshi
Because we want to hide the copy constructor and instead use our defensive copy method for copying.
Jan 26, 2017 · Naresh Joshi
because we don't want them to be accessible outside of the class, we will call them from our defensive copy method only
Jan 25, 2017 · Naresh Joshi
Even though we have done that in equal operation and it would have returned true but still we are getting different object after cloning
Jan 25, 2017 · Naresh Joshi
Thanks for noticing buddy, it was a typo and I have corrected it.
Jan 25, 2017 · Naresh Joshi
Yes surely, thanks for mentioning
Jan 25, 2017 · Naresh Joshi
Yes you are right, but aren't dynamic dispatch and polymorphism same things?
Jan 25, 2017 · Naresh Joshi
Yes surely, copy constructors should be private I forgot this. Thanks
Dec 30, 2016 · Ratha KM
Very nice and explanative article, Thank you!!!!
Oct 19, 2016 · Naresh Joshi
Yes you are right,Thanks for your answers
Oct 19, 2016 · Naresh Joshi
Thanks Robert, I will
Oct 18, 2016 · Naresh Joshi
Java 8 lambdas get converted to invokedynamic, And sorry but I don't have idea how that works
Oct 18, 2016 · Naresh Joshi
java.lang.Class is actually the internal structure of your class, everytime JVM loads a class into memory it creates an object of java.lang.Class<YourClass> in PermGenSpace.
And As I have mentioned in another comment In the source code of java.lang.Class, you can clearly see that "The primitive Java types (boolean, byte, char, short, int, long, float, and double), and the keyword void are also represented as Class objects."
If you study all the point which I have written in favor of "Why Java is a purely Object Oriented language", you clearly say even if these are primitive for developers, JVM internally treats them as objects.
Oct 18, 2016 · Naresh Joshi
As I mentioned in a previous comment, primitives are not objects for us, JVM treats them as some kind of internal objects on which we are not allowed to perform any operation as we can on objects.
Oct 18, 2016 · Naresh Joshi
I agree
Oct 18, 2016 · Naresh Joshi
Yes, I understood your point and I agree to it but Just try to read the source code of java.lang.Class, you will clearly see that "The primitive Java types (boolean, byte, char, short, int, long, float, and double), and the keyword void are also represented as Class objects."
If you study all the point which I have written in favor of "Why Java is a purely Object Oriented language", you clearly say even if these are primitive for developers, JVM internally treats them as objects
Oct 18, 2016 · Naresh Joshi
I do agree with your second point that outer classes do behave like static and can be understood as static.
But I don't agree on your first point "it's technically held in the JVMs internal structure for the class and not in j.l.Class."
java.lang.Class is actually the internal structure of your class. Everytime JVM loads a class into memory it creates an object of java.lang.Class<YourClass> in PermGenSpace.
Jun 23, 2016 · Naresh Joshi
thanks all for giving your precious time and mentioning your points
Jun 23, 2016 · Naresh Joshi
thanks Michael, i have corrected it.