Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You have created a class as shown below: class Compare i public static void main (String args) System.out.println(compare(3,4)); System.out.println(compare(3,2)); System.out.println(compare(3,3)); public static int compare(int a,
You have created a class as shown below: class Compare i public static void main (String args) System.out.println(compare(3,4)); System.out.println(compare(3,2)); System.out.println(compare(3,3)); public static int compare(int a, int b)[ int result = a>b71:-1; if(a-b) result=0 ; return result 1. The class name is 2. The class has 3. The compare method's return data type is 4. The output of the three statements in the main method are respectively ; its source file is saved in a file named methods. (use numeric value such as 8 instead of word such as eight; no quotation marks) . The method has arguments (use numeric value) and
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started