Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
HELP WITH getClass() method - Java Community | Help. Code. Learn.
JC|HCL
Java Community | Help. Code. Learn.
•
2y ago
•
100 replies
userexit
HELP WITH getClass() method
Consider this class
:
public class MyClass {...}
public class MyClass {...}
what is the difference between using getClass
(
) and using MyClass
.class
,
I heard somewhere that getClass
(
) can cause unexpected behaviour when a class extends MyClass but why would that happen
?
Java Community | Help. Code. Learn.
Join
We are a Community full of Java developers. Connect with other devs, get help, help others and do much more!
27,705
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
help with method ”nextDog” method, on pic 4
JC|HCL
Java Community | Help. Code. Learn. / java-help
3y ago
Need help with calling a method
JC|HCL
Java Community | Help. Code. Learn. / java-help
4y ago
Next page