My problem is that I cannot get the method printMultiples to print. If I try to put a print statement in main it just says cannot find symbol, so I put the method in main and it works, but I have to use a method in my assignment. The program assigns N and a multiple and gets input from the user. The method printMultiples takes the variable n the user input and gets the first 6 multiples. My real question is how do i get n incorporated with printMultiples and get printMultiples to print?
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package factorial; /** * * @author student */ import java.util.Scanner; public class Factorial { /** * @param args the command line arguments */ public static void main(String[] args) { int n; Scanner reader = new Scanner (System.in); System.out.println("What Number?"); n = reader.nextInt (); System.out.println(printMultiples); } public static void printMultiples (int n, int result) { int i = 1; while (i <=6) { System.out.print(n*i + " "); i = i + 1; } System.out.println(""); } }