Advertisement
jaVer404

level15.lesson04.task05

Jul 5th, 2015
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.73 KB | None | 0 0
  1. package com.javarush.test.level15.lesson04.task05;
  2.  
  3. /* Все лишнее - прочь!
  4. Убрать в методе main лишние строки, для которых метод add нереализован.
  5. */
  6.  
  7. public class Solution {
  8.     public static void main(String[] args) {
  9.         add((short) 1, 2f);
  10.         add(1, 2);
  11.         add(2d, 2);
  12.         //add("1",2d);
  13.         add((byte) 1, 2d);
  14.     }
  15.  
  16.     public static void add(int i, int j) {
  17.         System.out.println("Integer addition");
  18.     }
  19.  
  20.     public static void add(int i, double j) {
  21.         System.out.println("Integer and double addition");
  22.     }
  23.  
  24.     public static void add(double i, double j) {
  25.         System.out.println("Double addition");
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement