What is the prob with my code

import java.util.*;
public class Main {
public static void main(String args[]) {

    Scanner sc= new Scanner(System.in);
    int sum=0;
    while(true){
        int x=sc.nextInt();
        sum = sum=x;
        if(sum>=0){
          System.out.println(x);}
          else
          {
              break;
          }
    }
}

}

Hey @himanshusingh2389_63aac7fac0c69386 Please tell me your problem ?

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.