The program reads values from scanner until the value 0 is given, which finishes the process. The program will compile the sum only if all the numbers given are integers. In all the other situations (where not all of the values are integers) the program won't give anything out. 
So i noticed my program gives out the sum of the integers even if there are other non integer values given and sometimes when they are all integers given it doesn't show the real sum just one of the numbers or something.

```
  import java.util.Scanner;
public class Testing3{
    public static void main(String[] args) {
        int sum1 = 0;
        Scanner input = new Scanner(System.in);
        System.out.println("Enter number");
        String number = input.nextLine();
        int value =Integer.parseInt(number);
        while(true) {
            if (value!=0) {
                number = input.nextLine();
                if (Math.round(value)==value)//condition to integer{
                    sum1 = sum1 + value;
            } else {
                System.out.println(sum1);
                break;
            }
        }
    }
}

```