How do I remove the error? import java.lang.Math;import java.util.Scanner;public class MidtermProblems{ public static String odd(int a) { int odds; odds = a; String s; if(odds > 0) { //s = odds;...


How do I remove the error?


import java.lang.Math;
import java.util.Scanner;
public class MidtermProblems
{
   public static String odd(int a)
   {
   int odds;
        odds = a;
        String s;

        if(odds > 0)
        {
            //s = odds;
            return "odds";
        }
        else if(odds <>
        {
            s =  "None";
        }
        else
        {
            s = "";
        }
        return s;
    }
        public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        int a=0;
        int odds;
        a = in.nextInt();
        String result = odds(a);
        System.out.println( result );
    }


}


MidtermProblems.java:32: error:<br>cannot find symbol<br>String result<br>= odds (a) ;<br>symbol:<br>method odds (int)<br>location: class MidtermProblems<br>

Extracted text: MidtermProblems.java:32: error: cannot find symbol String result = odds (a) ; symbol: method odds (int) location: class MidtermProblems

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here