Results 1 to 2 of 2

Thread: How to inherit class in Java progamming

  1. #1
    Geek_Guest
    Guest

    How to inherit class in Java progamming

    How to inherit class in Java progamming

    Question asked by visitor sagar reddy


  2. #2
    Junior Member
    Join Date
    Jul 2007
    Answers
    12

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact