why is the customer called a co-constructor in Autofab
Answers
Answered by
4
ɪᴛ ɪs ᴄᴀʟʟᴇᴅ ᴡʜᴇɴ ᴀɴ ɪɴsᴛᴀɴᴄᴇ ᴏғ ᴛʜᴇ ᴄʟᴀss ɪs ᴄʀᴇᴀᴛᴇᴅ. ... ɪᴛ ɪs ʙᴇᴄᴀᴜsᴇ ᴊᴀᴠᴀ ᴄᴏᴍᴘɪʟᴇʀ ᴄʀᴇᴀᴛᴇs ᴀ ᴅᴇғᴀᴜʟᴛ ᴄᴏɴsᴛʀᴜᴄᴛᴏʀ ɪғ ʏᴏᴜʀ ᴄʟᴀss ᴅᴏᴇsɴ'ᴛ ʜᴀᴠᴇ ᴀɴʏ.
Answered by
13
Explanation:
Answer: It is because java compiler creates a default constructor if your class doesn't have any.
Similar questions