You are on page 1of 1

import java.io.*; class mdemo { public static void main(String ag[]) throws IOException { sample s = new sample(); s.

add(10,20); s.add("wel","come"); s.add1(1.01,2.34); } } class sample { int add(int a,int b) { int c=a+b; System.out.println("Integer " +c); return 0; } String add(String a, String b) { String c=a+b; System.out.println("String " +c); return null; } float add1(float l,float e) { float c=l+e; System.out.println("Float " +c); return 0; } };

You might also like