need help for java questions


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: need help for java questions

  1. #1
    Join Date
    Mar 2008
    Posts
    1

    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

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    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

  3. #3
    Join Date
    Apr 2008
    Posts
    2

    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();
    }

  4. #4
    Join Date
    Apr 2008
    Posts
    2

    solution

    Farah, If you were able to get a solution to the questions, please send the answers to me as well.

Similar Threads

  1. Replies: 0
    Last Post: 12-16-2006, 03:04 AM
  2. some questions in VB.NET
    By memee4eva in forum .NET
    Replies: 1
    Last Post: 05-01-2006, 09:07 AM
  3. randomly select quiz questions
    By galgal5814 in forum ASP.NET
    Replies: 5
    Last Post: 03-10-2006, 12:10 PM
  4. Replies: 13
    Last Post: 05-23-2005, 06:22 PM
  5. Multiple-choice questions in Access
    By Paul Gardner in forum VB Classic
    Replies: 1
    Last Post: 06-15-2001, 10: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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center