Ask Experts Questions for FREE Help !
Ask
    sesa's Avatar
    sesa Posts: 1, Reputation: 1
    New Member
     
    #1

    Dec 12, 2014, 12:42 AM
    Can someone fix this for me! Please?
    Can someone please! Fix this for me?


    My program :
    loop reads 10 double numbers
    after that
    inserts them into an array list.
    after that
    print MAx and MIn And AVg


    THIS MY PROGRAM WHY I CAN NOT MAKE COMPILE Fix this for me :












    package javaapplication1;
    import java.util.Scanner;
    import java.util.ArrayList;
    import java.util.Collections;




    public class Majed203
    {
    public static void main(String[] args);


    Scanner in = new Scanner(System.in);
    ArrayList<Double> numbers = new ArrayList<>();
    double sum =0.0;
    double avg =0.0;
    System.out.println("Enter 10 numbers, New line for each Input.");

    for (int I=0; I<10 ; I++)
    numbers.add(in.next.Double());

    for (int I = numbers.size() -1; I >= 0; I--)

    sum = sum + numbers.getClass(I)
    Object maxRe = Collections.max(numbers);
    Object minRe = Collections.min(numbers);
    avg = sum/10;

    System.out.println("Maximum = " + maxRe);
    System.out.println("Minimum = " + minRe);
    System.out.println("Average = " + avg);
    CravenMorhead's Avatar
    CravenMorhead Posts: 4,532, Reputation: 1065
    Adult Sexuality Expert
     
    #2

    Dec 12, 2014, 09:11 AM
    What is the compile error that you got?

    Is this your file or your code? There are some fundemental issues here but I don't know if it is just your formatting or if it your actual code.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

How can I fix it? [ 6 Answers ]

Yesterday I was at a party with some friends. While I was at the toilet, they thought it would be funny to write to my boyfriend from my phone. So they sent him a sms saying I wanted to break up with him. When I came back, my (now ex-) boyfriend had already changed his relationship status on...

How can I fix this? [ 1 Answers ]

I have a complicated question, I hope someone out there may have some insite on my situation. My ex husband and I divorced 5 years ago. At the time, we agreed that our daughters would live with him due to him having a more secure job. He has done everything in his power to make me out to be the bad...

Hole in trunk; to fix or not to fix? [ 1 Answers ]

I have a massive Catalpa (sp) tree in my front yard. The trunk is about 4 feet in diameter at ground level. About 10 feet up the trunk, there is an oblong hole that's about 10" tall by 4" wide. I think squirrels are living in there. While I don't want to harm the squirrels, I don't want to lose...

Can I fix hazardous steps if a contractor is refusing to fix, and threatens to sue? [ 1 Answers ]

I live in central Texas. I hired a landscape contractor to install retaining walls and a patio which included 4 steps in stone. These steps range in size from 6.5" to 9.5" and the tallest is on the top! They are very dangerous. He refuses to do any fixes, and walked off project. At one point in the...


View more questions Search