Question
Define Constructor and Constructor Overloading in Java?

Answers

Constructor – It gets invoked automatically when a new object is created. Every class has a constructor, so even if one forgot to mention it, the Java compiler itself creates a default constructor for that class. Constructor is like a method that doesn’t return the type.
Constructor overloading – It is same as method overloading. Same constructor with different parameters can be declared in the same class. Then it’s the role of compiler to differentiate which constructor needs to be called depending upon the parameters and the sequence of data types.   Your Comment




More Software,Java Questions..
What is the inputsplit in map reduce software?

Can variables be used in Java without initialization?

What is the difference between java bean and enterprise java bean?

What is software configuration management?

How does the java database connectivity (jdbc) work?

What are the advantages of threads in java?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

What is object cloning in Java?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?



Search
Can you Answer!!
  • Q Give an account on Dictyostelium?
  • Q What is a typical ue sensitivity level?
  • Q Unable to enter Project information on the Distribution line of a Requisition.
  • Q I have a form with a submit button. On the form and the submit button are two separate listeners. Which is invoked first?
  • Q Multitasking support is available from which version in iOS operating system?
  • Q Palghat Mani plays which instrument in Indian Classical Music?
  • Q What happens to the gas in a cow's rumen?
  • Q What are your thoughts on social media for this role?
  • Q Who is considered the father of accounting?
  • Q Have you memorized your introduction?
  • Q Can you explain how do 'map' and 'reduce' work?