473,545 Members | 937 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how many methods are there in class runnable?

1 New Member
how many methods are there in class runnable?
Dec 1 '10 #1
2 1566
Oralloy
988 Recognized Expert Contributor
Tanmay Kadam,

What do you mean?

You can go to the JavaDoc and count class-specific methods.

You can recursively walk the class tree and get all inherited methods.

Neither method gives you the hidden, compiler-generated methods, though.

Likely the easiest method for you to count the methods is to use the reflection facilities. (see the java.lang.refle ct package)

Try starting with:
Expand|Select|Wrap|Line Numbers
  1. java.lang.Runnable.class.getMethods()

Cheers!
Oralloy
Dec 1 '10 #2
Sean Pedersen
30 New Member
The only overloaded method is run(). Overloading that method is required to start a new Thread with Runnable. The other I know about is start(). When called it executes your run() method in the new Thread object.
http://download.oracle.com/javase/6/...html#run%28%29
Dec 6 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

99
5820
by: David MacQuigg | last post by:
I'm not getting any feedback on the most important benefit in my proposed "Ideas for Python 3" thread - the unification of methods and functions. Perhaps it was buried among too many other less important changes, so in this thread I would like to focus on that issue alone. I have edited the Proposed Syntax example below to take out the...
22
5811
by: Marcin Vorbrodt | last post by:
Taken out of C++ In a Nutshell book... Example 7-18: Using an abstract classes as interface specification. struct Runnable { virtual void run() = 0; }; struct Hashable { virtual size_t hash() = 0; };
3
1983
by: Steven D'Aprano | last post by:
I've been doing a lot of reading about static methods in Python, and I'm not exactly sure what they are useful for or why they were introduced. Here is a typical description of them, this one from Guido: "The new descriptor API makes it possible to add static methods and class methods. Static methods are easy to describe: they behave...
1
6520
by: Andrew Parker | last post by:
Hi, I'm having a syntax problem and hours of googling has yet to reveal a solution. I'm writing a class that contains only public static methods. It's a class of useful misc. functions that don't require any variables. So i'm writing in my header file: class Helper { public: static int helperOne();
0
1115
by: Asfand Yar Qazi | last post by:
Hi, Is is possible to set the 'policy' of a class by allowing the user to specify a template argument that defines what some functions will be based on the template argument given? Basically, it's the old 'make the user derive from a virtual base class' vs. 'use attachable callbacks (or in this case signals/slots)' problem - and I'm...
0
1401
by: wwweee | last post by:
I am reading a book about Python Programming. When I practised the following example: from livewires import games SCREEN_WIDTH = 640 SCREEN_HEIGHT = 480 class Pizza(games.Sprite, games.Mover): """ A falling pizza. """ def __init__(self, screen, x, y, image, dx, dy):
1
1514
by: Alexander Vasilevsky | last post by:
Can I get a list of ALL the fields and methods of class? http://www.alvas.net - Audio tools for C# and VB.Net developers + Christmas discount
3
1570
by: devgupta01 | last post by:
How to see methods of class/inteface of library if i m using console. Please give an example. thnx
1
1726
by: IntellectYog | last post by:
Hello, Here I am to find How to add Tool Tip to the Peroperty and Methods written in my class , so that I can see then after calling it using Object of that class in source code. I need this in ASP.NET Is it possible ? and How ? I want to do this in manual coding and not to use any tool. Plz. suggest.
4
1742
by: emtech | last post by:
In Class java.lang.VMSystem there are native methods ,can any body tell me where can I get source code for these native methods? Thanks in advance.
0
7467
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7656
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7419
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7756
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4944
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3442
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1014
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
703
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.