Cant seem to fix errors....

Hey I'm currently making a program with several arrays and methods and as you will soon find out I am relatively new to Java... I have 2 errors that I seem to not be able to fix despite what I try.... I'm open to suggestions and recommendations, thanks.

import java.util.Scanner;

class Marks

{

publicstaticvoid main (String [] args)

{

Scanner in =new Scanner(System.in);

System.out.println("will determiune a abuchn of crap");

int classMarks[];

classMarks =newint[29];

for(int i = 0; i <= classMarks.length; i ++)

System.out.println("Enter the 30 marks");

int marks = in.nextInt();

System.out.println("The class exam marks are: " + classMarks);

int[] marks = enterMarks();

int[] marks = Max();

int[] marks = Min();

int[] marks = Average();

int[] marks = Passed();

}

staticint Max()

{

System.out.println("The maximum mark in the class was: " + Max);

}

staticint Min()

{

System.out.println("The minimum mark in the class was: " + Min);

}

staticdouble Average()

{

System.out.printf("The class average correct to 1 decimal place is: " + Average);

}

staticint Passed()

{

if(Marks =>8)

System.out.println("The number of students who passed the exam is " + Passed);

}

}

The errors:

C:\Documents and Settings\Desktop\Marks.java:44: illegal start of expression

if(Marks =>8)

^

C:\Documents and Settings\Desktop\Marks.java:45: ')' expected

System.out.println("The number of students who passed the exam is " + Passed);

^

2 errors

Tool completed with exit code 1

By the way I'm using Textpad Please considering helping, I would most appreciate anything. Thanks

[3216 byte] By [Xavyaa] at [2007-11-26 14:43:12]
# 1
>=
CeciNEstPasUnProgrammeura at 2007-7-8 8:30:50 > top of Java-index,Java Essentials,New To Java...
# 2
But there will be many more problems. This won't compile in a long time. Assigning int to int[], methods not returning anything...And please learn to stick with the naming convention. Variables and method names begin with lower-case letters.
CeciNEstPasUnProgrammeura at 2007-7-8 8:30:50 > top of Java-index,Java Essentials,New To Java...
# 3
and your methods don't return anything. According to your main(..) they are all supposed to return int[], but that doesn't make sense.
PhHeina at 2007-7-8 8:30:50 > top of Java-index,Java Essentials,New To Java...
# 4

Start with just this:

import java.util.Scanner;

class Marks

{

public static void main (String [] args)

{

Scanner in = new Scanner(System.in);

System.out.println("will determiune a abuchn of crap");

}

}

See if you can get that working.

Once that compiles and works slowly add things in. Only add in something when the last thing works and compiles.

Aknibbsa at 2007-7-8 8:30:50 > top of Java-index,Java Essentials,New To Java...
# 5

I like Aknibbs approach.

Programming is an iterative process.

Start with the smallest part and get that to work.

Then add small pieces(self contained modules) to it.

And test it.

This approach helps avoid a lot of unneccessary headaches trying to figure out the issues of a program put together without testing the individual pieces.

Hope it helps,

discussjava.com

discussjava.com_a at 2007-7-8 8:30:50 > top of Java-index,Java Essentials,New To Java...
# 6
Also, declaring the int[] marks over and over and over, etc. You can only declare a variable once in its scope.Follow AKNibbs advice. Add one feature at a time, make sure that feature works, then move on.~Tim
SomeoneElsea at 2007-7-8 8:30:50 > top of Java-index,Java Essentials,New To Java...