Answered step by step
Verified Expert Solution
Link Copied!

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,

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions

Question

What activities comprise production activity control?

Answered: 1 week ago

Question

Describe the job youd like to be doing five years from now.

Answered: 1 week ago

Question

So what disadvantages have you witnessed? (specific)

Answered: 1 week ago