The Artima Developer Community
Sponsored Link

Java Buzz Forum
How Constructor Chaining works in Java - Example

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Javin Paul

Posts: 454
Nickname: javinpaul
Registered: Jan, 2012

Javin Paul is Java Programmer working on Finance domain.
How Constructor Chaining works in Java - Example Posted: Jan 1, 2013 6:02 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Javin Paul.
Original Post: How Constructor Chaining works in Java - Example
Feed Title: Java67
Feed URL: http://java67.blogspot.com/feeds/posts/default?alt=rss
Feed Description: Java and technology tutorials, tips, questions for all programmers.
Latest Java Buzz Posts
Latest Java Buzz Posts by Javin Paul
Latest Posts From Java67

Advertisement
How to call one constructor from other constructor in Java or What is Constructor Chaining in Java is one of the tricky questions in Java interviews. Well you can use this keyword to call one constructor from other constructor of same class, if you want to call constructor from based class or super class than you can use super keyword. Calling one constructor from other is called Constructor chaining in Java. Constructors can call each other automatically or explicitly using this() and super() keywords. this() denotes a no argument constructor of same class and super() denotes a no argument or default constructor of parent class. Also having multiple constructor in same class is known as constructor overloading in Java.
Read more ยป

Read: How Constructor Chaining works in Java - Example

Topic: Checked and Un-Checked exceptions in Java Previous Topic   Next Topic Topic: How to generate hashcode method for a class in Java


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us