-
need help for java questions
hello evryone i need help for following java program plzz anone help me for this
1-write a Java program to count 1 to 1000 numbers using 10 threads
2-write a program that accpets a natural number of 4 digit as input and prints out all possible permutations of the number
write a recurssive program in Java for the greatest common divisor(GCD).given two postive integers,the GCD is the largest integer that divides them both
-
Welcome to DevX 
We aren't going to write your code for you, but we will help you write the code for yourself.
What have you got so far?
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
-
Hello Farah
please send me solution fr
Suppose that you have to computerise your study centre which organises the weekend classes for computer programs (theory as well as practicals) and also gets assignment evaluated.
(i) List all-important classes, their data structure and other attributes, in a language similar to Java Programming.
(ii) Draw an inheritance diagram for the entire application, which should comprise of base classes and sub-classes.
(iii) Write a pseudo coded of at least 3 methods
AND
Write a program that accepts a natural number of 4 digits as input and prints out all possible permutations of the number.
---------------------------------------------------
ANS 7
Write a java progran to count 1 to 1000 numbers using 10 threads?
class Number
{
private int ctr = 0;
synchronized void cnumber()
{
ctr = ctr = 1;
}
void print()
{
system.out.println("NO :" + ctr);
}
}
class Num estends Threads
{
Number NN;
Num (Number NN)
{
this.NN = NN();
}
public void run()
{
try{
for (int I = 0; I<1000; I++)
{
Number.cnumber();
}
catch {Exception e)
{
e.printStackTrace();
}
}
}
}
public static void main (String args[])
{
Number NN= new Number();
NN.start();
NN.print();
}
-
solution
Farah, If you were able to get a solution to the questions, please send the answers to me as well.
Similar Threads
-
By pravin007 in forum Java
Replies: 0
Last Post: 12-16-2006, 02:04 AM
-
By memee4eva in forum .NET
Replies: 1
Last Post: 05-01-2006, 08:07 AM
-
By galgal5814 in forum ASP.NET
Replies: 5
Last Post: 03-10-2006, 11:10 AM
-
Replies: 13
Last Post: 05-23-2005, 05:22 PM
-
By Paul Gardner in forum VB Classic
Replies: 1
Last Post: 06-15-2001, 09:10 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
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks