Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: JCF to make sorted tabel with number of.....

  1. #1
    Junior Member
    Join Date
    Oct 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default JCF to make sorted tabel with number of.....

    Hi there. Im new here.

    I have som very little code:

    public void frequency(int [] arr){

    int arr[] = {2,5,2,9,7,1,100,2,3,5,7,7,9,1,2,6,5};
    Now I have to make an algorithm to show how many times each number is in the array and show the index as well.

    Any ideas to the a good easy way?
    Im totally lost here.


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: JCF to make sorted tabel with number of.....

    Welcome to the Forum! Please read this topic to learn how to post code correctly and other useful tips for newcomers.

    Please post your code correctly per the above link.

    Search for 'java frequency counter' and review those results that address counting numbers rather than words.

    Also posted here.

Similar Threads

  1. [SOLVED] Beginner trying to make distance in positive number
    By Masic1990 in forum What's Wrong With My Code?
    Replies: 6
    Last Post: August 25th, 2014, 12:34 PM
  2. Replies: 0
    Last Post: January 4th, 2014, 02:25 PM
  3. Make a Cluster for given number of node
    By Neeraj Jain in forum What's Wrong With My Code?
    Replies: 2
    Last Post: November 29th, 2011, 03:09 PM
  4. Traversing a min heap to get sorted
    By derek in forum Algorithms & Recursion
    Replies: 2
    Last Post: November 20th, 2010, 04:17 PM
  5. Sorted Doubly linked List
    By student in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 15th, 2010, 09:52 PM

Tags for this Thread