Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on How to inherit class in Java progamming within the Java forums, part of the Software Development category; How to inherit class in Java progamming Question asked by visitor sagar reddy...
|
|||||||
|
|||
|
Re: How to inherit class in Java progamming
For extending a class in java programming, u should make use of 'extends' keyword.
Ex: ClassA is the class which u would like to inherit in ClassB. Code is as follows //CODE public class ClassB extends ClassA { Note: we cannot inherit more than one class at a time in Java. For this we must go for multilevel inheritance. |
| The Following User Says Thank You to JaiBharath For This Useful Post: | ||
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to test java project in QTP without java addin | Geek_Guest | QTP | 12 | 08-30-2009 12:55 AM |
| How to set path for java in Linux for java programs | jitudash | Java | 2 | 04-24-2008 07:15 AM |
| Types of java progamming languages | Geek_Guest | Java | 1 | 08-09-2007 10:33 AM |
| What is class loader | rajesh.tripathi | Java | 2 | 07-17-2007 08:57 AM |
| how many learners are there in the class? | jamesravid | Brainteasers | 7 | 12-04-2006 07:59 AM |