Advertisement
kk258966

4/1 物件導向程式設計 練習三

Apr 1st, 2015
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.23 KB | None | 0 0
  1. public class B10207081_2{
  2.   public static int add(int a,int b){
  3.     return a+b;
  4.   }
  5.    
  6.    public static void main(String args[]){
  7.        
  8.      int num1=20,num2=30;
  9.      System.out.println("總和:"+add(20,30));
  10.    }
  11.        
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement