As Java is OOP language, it supports method overloading
add(int a,int b) : Takes two integer values and returns their sum
add(int a,int b,int c) : Takes three integer values and returns their sum
add(String s1,String s2) : Takes two strings and join them with a space
add(int a,int b) : Takes two integer values and returns their sum
add(int a,int b,int c) : Takes three integer values and returns their sum
add(String s1,String s2) : Takes two strings and join them with a space
No comments:
Post a Comment