Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. class Test
  2. {
  3. public void m1(int x)
  4. {
  5. System.out.println(“int-arg”);
  6. }
  7. public void m1(float f)
  8. {
  9. System.out.println(“float-arg”);
  10. }
  11. public void m1(char c)
  12. {
  13. System.out.println(“char-arg”);
  14. }
  15. }
  16. public static void main(String [] args)
  17. {
  18. Test t = new Test();
  19. t.m1(10);
  20. t.m1(10.4f);
  21. t.m1(‘a’);
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement