Results 1 to 4 of 4
  1. #1
    mikeiz404 is offline Member
    Join Date
    Jan 2009
    Posts
    14
    Rep Power
    0

    Exclamation 'Class' Object and calling Static Methods?

    [moved topic to 'New to Java' Forum]
    -> http [colon slash slash doubleyou doubleyou doubleyou dot] java-forums.org/new-java/15233-class-object-calling-static-methods.html
    Last edited by mikeiz404; 01-24-2009 at 05:14 AM. Reason: moved topic to 'New to Java' Forum

  2. #2
    toadaly is offline Senior Member
    Join Date
    Jan 2009
    Posts
    671
    Rep Power
    6

    Default

    The question is very vague. I'm guessing you want to know what the class Object is all about and how to call static methods?

    In Java, Object is the superclass that all other classes subclass. This happens behind the scenes automatically and can not be bypassed (unless you write your own java compiler and JVM I suppose). As a result every class has some basic functionality even if you don't define any, such as the toString method.

    To call a static method, the syntax is {class}.{method}.

    For example, Runtime.getRuntime() returns the default Runtime object.

  3. #3
    mikeiz404 is offline Member
    Join Date
    Jan 2009
    Posts
    14
    Rep Power
    0

    Default

    I am actually referring to the 'Class' Class. I should have been more clear.

    [Sorry, but could you please reply in the other forum section. My full response is there as well]
    Last edited by mikeiz404; 01-24-2009 at 05:17 AM. Reason: clarification

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default

    [off topic, removed]
    Last edited by DarrylBurke; 01-24-2009 at 01:01 PM.

Similar Threads

  1. Replies: 8
    Last Post: 04-16-2012, 11:00 PM
  2. Static methods
    By carderne in forum New To Java
    Replies: 10
    Last Post: 01-03-2009, 05:27 PM
  3. Abstract Class with Static Methods
    By bugger in forum New To Java
    Replies: 7
    Last Post: 09-05-2008, 12:20 AM
  4. Mocking static methods of class
    By Kat in forum New To Java
    Replies: 3
    Last Post: 11-08-2007, 12:24 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
  •