wiley_pastebin

lesson 4 output 2

Mar 15th, 2019
2,216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.22 KB | None | 0 0
  1. public class InteractionDemo {
  2.  public int squared(int x){
  3.   return x*x
  4.  }
  5.  
  6.  public void doCalculations(){
  7.   //do 3 squared plus 4 squared
  8.   int res = squared(3) + squared(4);
  9.   System.out.println(res);
  10.  } 
  11. }
Advertisement
Add Comment
Please, Sign In to add comment