Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
Java Constructor Tutorial
→
Java Constructor Interview Questions in Java Constructor Tutorial
→
Why Constructor Name Is Same As Class Name?
1.
Why Constructor Name Is Same As Class Name?
Answer»
Every class
OBJECT
is created using the same
NEW
keyword , so it must have information about the class to which it must
CREATE
object .
For this
REASON
constructor name should be same as class name.
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
If Class Has Explicit Constructor , Will It Has Default Constructor?
When Developer Must Provide Constructor Explicitly?
When Compiler Provides Default Constructor?
What Is Default Accessibility Modifier Of Default Constructor?
Why Compiler Given Constructor Is Called As Default Constructor?
Is Constructor Definition Is Mandatory In Class?
Can We Declare Constructor As Private?
Why Constructor Name Is Same As Class Name?
Why Return Type Is Not Allowed For Constructor?
How Compiler And Jvm Can Differentiate Constructor And Method Invocations Of Both Have Same Class Name?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies