Name the different types of constructors in Java.
Answers
Answered by
2
Explanation:
Types of Constructors
There are three types of constructors: Default, No-arg constructor and Parameterized.
If you do not implement any constructor in your class, Java compiler inserts a default constructor into your code on your behalf.
Answered by
2
Answer:
ᴛʏᴘᴇs ᴏғ ᴄᴏɴsᴛʀᴜᴄᴛᴏʀs
ᴛʜᴇʀᴇ ᴀʀᴇ ᴛʜʀᴇᴇ ᴛʏᴘᴇs ᴏғ ᴄᴏɴsᴛʀᴜᴄᴛᴏʀs: ᴅᴇғᴀᴜʟᴛ, ɴᴏ-ᴀʀɢ ᴄᴏɴsᴛʀᴜᴄᴛᴏʀ ᴀɴᴅ ᴘᴀʀᴀᴍᴇᴛᴇʀɪᴢᴇᴅ.
ɪғ ʏᴏᴜ ᴅᴏ ɴᴏᴛ ɪᴍᴘʟᴇᴍᴇɴᴛ ᴀɴʏ ᴄᴏɴsᴛʀᴜᴄᴛᴏʀ ɪɴ ʏᴏᴜʀ ᴄʟᴀss, ᴊᴀᴠᴀ ᴄᴏᴍᴘɪʟᴇʀ ɪɴsᴇʀᴛs ᴀ ᴅᴇғᴀᴜʟᴛ ᴄᴏɴsᴛʀᴜᴄᴛᴏʀ ɪɴᴛᴏ ʏᴏᴜʀ ᴄᴏᴅᴇ ᴏɴ ʏᴏᴜʀ ʙᴇʜᴀʟғ.
Similar questions