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 3 of 3

Thread: basic java question

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default basic java question

    Well i have these 2 questions that i have to answer for college and i cant write the programs.
    question 1 is..

    Using the data list given below to initialise an array, write programs to solve each of
    the following problems:
    Compute the sum of the elements in the array;
    Compute the product of the elements in the array;
    Print only the multiples of three in the array;
    Compute the frequency of the number 5 in the array;
    Print all those elements that are greater than the first element and less then the
    last element;
    Print all elements whose value is equal to their index value;
    Compute the mean of the elements in the list
    Data list: 2, 4, 6, 9, 5, 4, 5, 7, 12, 15, 21, 32, 45, 5, 6, 7, 12.

    question 2 is..
    Write a program that reads a list of 15 numbers and prints only those values that are
    greater than the last number on the list.

    any help would be much appreciated thanks.


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,607
    My Mood
    Hungover
    Thanks
    145
    Thanked 658 Times in 563 Posts
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,265
    Thanks
    56
    Thanked 2,372 Times in 2,343 Posts

    Default Re: basic java question

    any help would be much appreciated thanks.
    Post your code and your questions and someone will try to help.

Similar Threads

  1. Basic Java question
    By fred2028 in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: September 13th, 2011, 04:54 PM
  2. Basic java question
    By erosgol in forum Java Theory & Questions
    Replies: 5
    Last Post: September 2nd, 2011, 06:24 PM
  3. Very new to Java basic question
    By loofy in forum What's Wrong With My Code?
    Replies: 3
    Last Post: July 23rd, 2011, 07:21 PM
  4. please answer some basic question
    By togaurav in forum Java Theory & Questions
    Replies: 5
    Last Post: April 16th, 2011, 08:58 AM
  5. [SOLVED] Asking what I suspect to be a very basic question
    By Noobert in forum What's Wrong With My Code?
    Replies: 3
    Last Post: May 24th, 2010, 08:42 AM