Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Abstract

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Abstract

    i want to abstract my abstract class to other class e.g..
    abstract class Human
    {
    String sound;
    abstract void makeSoud();
    }
    abstract class Europian extends Human
    {
    abstract void makeTone();
    }
    class Spanish extends Europian
    {
    void makeTone()
    {
    System.out.println("Voukhu");
    }
    }
    is this is possible or not!i can;t do that!pliz


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: Abstract

    Do you get compiler errors? Please post them here.

  3. #3
    Junior Member
    Join Date
    Sep 2011
    Posts
    18
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: Abstract

    Its not possible at all. Your Spanish class is not abstract class and none of the class in hierarchy is providing the implementation for makeSoud() method.

Similar Threads

  1. Abstract class
    By jeskoston in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 26th, 2011, 01:46 PM
  2. Replies: 12
    Last Post: January 1st, 2011, 03:47 AM
  3. abstract class
    By robinglow in forum Java Theory & Questions
    Replies: 2
    Last Post: August 20th, 2010, 01:36 AM
  4. abstract class
    By robinglow in forum AWT / Java Swing
    Replies: 2
    Last Post: August 20th, 2010, 01:36 AM
  5. [SOLVED] Abstract Classes Help
    By SweetyStacey in forum Object Oriented Programming
    Replies: 10
    Last Post: May 6th, 2010, 06:15 AM