Results 1 to 3 of 3
  1. #1
    Army is offline Senior Member
    Join Date
    Jan 2012
    Posts
    147
    Rep Power
    0

    Default Can a class with the main method in it extend?

    I don't like making so many Objects. Can I just extend it? If so, how would I input the methods inherited by it?

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,993
    Rep Power
    9

    Default Re: Can a class with the main method in it extend?

    What happened when you tried?

    Also, I'm not sure how making an Object that inherits from another Object will allow you to make less Objects? What exactly do you mean by that?

    Recommended reading: Inheritance (The Java™ Tutorials > Learning the Java Language > Interfaces and Inheritance)
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Sierra is offline AN21XX
    Join Date
    Mar 2012
    Location
    Munich
    Posts
    297
    Rep Power
    3

    Default Re: Can a class with the main method in it extend?

    Yes you should be able to do so, I see no problem... ^^

Similar Threads

  1. Class Communication/ Main Method
    By javaNewblet in forum New To Java
    Replies: 5
    Last Post: 11-14-2011, 07:43 AM
  2. Main Method Can't Find It's Parent Class
    By Slinkie45 in forum New To Java
    Replies: 11
    Last Post: 05-09-2011, 02:37 AM
  3. main method not found in class
    By eLancaster in forum New To Java
    Replies: 5
    Last Post: 02-09-2011, 08:48 AM
  4. Running main method class from another main class
    By tlrocketman in forum New To Java
    Replies: 3
    Last Post: 12-06-2010, 08:30 AM
  5. executing a method in main class
    By rangers27 in forum New To Java
    Replies: 3
    Last Post: 07-19-2008, 05:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •