methods help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nickels
    New Member
    • Sep 2008
    • 20

    #1

    methods help

    I cant seem to get methods to work why wont this compile?

    Code:
    import java.util.Scanner;
    
    public class test
    {
    public static int upper;
    public static int lower;
    int[] n = new int[5001];
    public static void main ( String args[] )
    {
    public initializeSeive() 
    {
    }
    public processSieve(); 
    {
    }
    public getBoundaries(); 
    {
    }
    public showSieve(); 
    {
    }
    
    }
    }
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    There's no return type for the methods and there's a semicolon at the end of
    the parameter lists and you can't define methods in the body of another method.

    kind regards,

    Jos

    Comment

    Working...