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: How to end a subclass?

  1. #1
    Member
    Join Date
    Sep 2012
    Location
    The Netherlands
    Posts
    84
    My Mood
    Inspired
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default How to end a subclass?

    Does anyone how to end a subclass?

    I have a subclass with an if else loop.
    But now I want when the else loop is activated, it need to end that subclass.


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: How to end a subclass?

    The keywords if and else do not make a loop, they just have a block of code associated with their scope.

    I do not know what you mean by end a subclass either.

    Perhaps the code will help explain what you are trying to do.

  3. #3
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,550
    My Mood
    Grumpy
    Thanks
    0
    Thanked 169 Times in 160 Posts

    Default Re: How to end a subclass?

    With a closing bracket }, the same as any class.
    Improving the world one idiot at a time!

Similar Threads

  1. copying subclass object
    By spark in forum Object Oriented Programming
    Replies: 3
    Last Post: July 23rd, 2012, 06:49 PM
  2. Cannot find methods in a subclass
    By Dirk94 in forum Object Oriented Programming
    Replies: 2
    Last Post: March 15th, 2012, 09:32 PM
  3. Accessing fields of a subclass
    By Shaybay92 in forum Object Oriented Programming
    Replies: 3
    Last Post: September 2nd, 2011, 12:41 PM
  4. [SOLVED] how to extend a subclass?!
    By migongotar in forum Object Oriented Programming
    Replies: 4
    Last Post: August 2nd, 2011, 04:22 PM
  5. subclass that implements
    By speedycerv in forum Java Theory & Questions
    Replies: 1
    Last Post: March 30th, 2011, 08:35 AM