This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Getting handle on methods overriding abstract Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Getting handle on methods overriding abstract" Watch "Getting handle on methods overriding abstract" New topic
Author

Getting handle on methods overriding abstract

Mike Cunningham
Ranch Hand

Joined: Nov 14, 2000
Posts: 129
How can I make use of the following println statements in my main method? The problem I'm running into is that I'm trying to reference a non-static method from a static method. Any help would be much appreciated. Here's the code:

[This message has been edited by Mike Cunningham (edited December 11, 2001).]
Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2578

Here's how your main will look like -

Typically, in the main method you create an object of the desired class, and invoke class methods using that object.

HTH,
- Manish
Mike Cunningham
Ranch Hand

Joined: Nov 14, 2000
Posts: 129
That helped out. Thanks Manish.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Getting handle on methods overriding abstract
 
Similar Threads
Reference Variable Casting
Polymorphism
about arrays
Confused with instanceof, please help
Please explain this code