This Java code defines two methods, method1 and method2. Method1 declares three integer variables, sets c equal to the sum of a and b, and prints the answer. Method2 declares three integer variables, sets c equal to the product of a and b, and prints the result.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
40 views1 page
Java
This Java code defines two methods, method1 and method2. Method1 declares three integer variables, sets c equal to the sum of a and b, and prints the answer. Method2 declares three integer variables, sets c equal to the product of a and b, and prints the result.