473,473 Members | 1,583 Online
Bytes | Software Development & Data Engineering Community
Create 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 1564
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.reflect 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
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...
22
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...
3
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...
1
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...
0
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,...
0
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,...
1
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
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
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...
4
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
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
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...
0
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.