Based on the program below, answer the following questions: Q3.1 What will be the output of the
Question:
Based on the program below, answer the following questions:
Q3.1 What will be the output of the following program.
Q3.2 What is the function name?
Q3.3 How many parameters are passed to the function? Provide the name of the variables being passed and their type.
Q3.4 What is the return type from main() function?
Q3.5 What is being returned by the function?
Q3.6 What is the type of return value from the function difference()?
classMethodsTest
{ publicstaticvoidmain(Strings[])
{ intnumber1=25; intnumber2=10; intdiff=difference(number1,number2); System.out.println("The difference of two numbers is = "+diff); } publicstaticintdifference(intnum1,intnum2)
{ int diff
System.out.println("num1 = "+num1+" num2 = "+num2);
diff = num2 -num1 returndiff; }
}
International Marketing And Export Management
ISBN: 9781292016924
8th Edition
Authors: Gerald Albaum , Alexander Josiassen , Edwin Duerr