Hello,
I am trying to learn Java and ran into a problem with my code that I can seem to figure out. On line 17 it says this method must return a result type int. any guides would be appreciated.
import java.util.Scanner; public class Sticker { public static void main(String[] args) { Scanner scan = new Scanner(System.in); //Variables System.out.print("Enter a value for wc: "); int wc = scan.nextInt(); System.out.print("Enter a value for hc: "); int hc = scan.nextInt(); System.out.print("Enter a value for ws: "); int ws = scan.nextInt(); System.out.print("Enter a value for hs: "); int hs = scan.nextInt(); } public static int solve(int wc, int hc, int ws, int hs) { if (wc -ws < 2) return(1); else if (hc - hs <=2) return(0); } }