what is the difference a zero argument constructor and a
default constructor?



what is the difference a zero argument constructor and a default constructor?..

Answer / Yatendra Pal Singh

In Java, both Zero Argument Constructor and Default Constructor serve the purpose of creating objects without explicit parameters. However, they have some differences:n1. Zero Argument Constructor - A zero-argument constructor is a constructor that doesn't take any arguments in its method signature. It is used to create an object with default initial values.n2. Default Constructor - By default, Java generates a no-argument constructor for every class. If you don't provide any constructors explicitly, the default constructor will be used when creating objects of that class.n3. Differences - The main difference lies in when they are generated: Zero Argument Constructors are user-defined, while Default Constructors can be either user-defined or automatically generated by the compiler if no constructors are defined.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Engineering AllOther Interview Questions

What is the difference between operator overloading and function overloading in C when compared with C++?

1 Answers  


Three pc now connected the 24 port switch.one pc ip adders 192.168.0.125,anather pc ip is 192.168.0.98, anather pc ip is 192.168.0.123, so 98 or 125 ping replay to 123,but 123 is not replay 125 or 98, but 123 is others pc ping replay,

1 Answers  


how to identify analog and digital in instrumentation

1 Answers   GS Engineering Construction,


What is HPLC ? and define it.

1 Answers  


I am looking for NIC Scientific Officer / Engineer-SB (Programmer)Sample papers or any portion of questions/ syllabus plz, send me on sengupta.pranab@gmail.com. Regards PRANAB

0 Answers  


why does the array will be start on size 0?

1 Answers   TCS,


I am haning thousands emails in my send box (which i sended.) Now i want to send all these emails (Total in send box)to other by email. Can i send total emails at one time (Not sending each indivisually) by one comand; Please tell the steps..Thanks.

1 Answers  


as we know that java is a platform independent language, but we need jvm for the same operating system why?

1 Answers  


As you achieve greater success with the company after some years, Will you like to be a shareholder in our company?

1 Answers   GE,


Phong shading refers to describe

1 Answers   NIC,


what is the difference between physical address and logical address?

1 Answers  


Explain force?

1 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5086)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4453)
  • Electrical Engineering Interview Questions Electrical Engineering (16638)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)