Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Test
- {
- public void m1(int x)
- {
- System.out.println(“int-arg”);
- }
- public void m1(float f)
- {
- System.out.println(“float-arg”);
- }
- public void m1(char c)
- {
- System.out.println(“char-arg”);
- }
- }
- public static void main(String [] args)
- {
- Test t = new Test();
- t.m1(10);
- t.m1(10.4f);
- t.m1(‘a’);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement