Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class M_Over {
- public int add(int a, int b) {
- return a + b;
- }
- public int add(int a, int b, int c) {
- return a + b + c;
- }
- }
- public class Pr1b {
- public static void main(String args[]) {
- M_Over obj = new M_Over();
- System.out.println("Sum=" + obj.add(5, 6));
- System.out.println("Sum2=" + obj.add(5, 6, 10));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement