Asked by Trish Goal
                Write a method in Java that takes two parameters. If the first parameter is equal to the second parameter multiply both and print the result. 
Thanks.
            
        Thanks.
Answers
                    Answered by
            Steve
            
    There are lots of java snippets online. Here's something that should work:
public static void xx(int n1, int n2) {
if (n1 == n2) System.out.println(n1*n2);
}
It can be prettied up some, but that's basically all you need.
    
public static void xx(int n1, int n2) {
if (n1 == n2) System.out.println(n1*n2);
}
It can be prettied up some, but that's basically all you need.
                                                    There are no AI answers yet. The ability to request AI answers is coming soon!
                                            
                Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.