System.out.print() not working

When I use System.out.print() the console doesn’t show anything, it only works if I put System.out.println() . Is there something I’m doing wrong?

import java.util.Scanner;

public class Calculator {
    
    public static void main(String[] args) {
    
        Scanner scanner = new Scanner(System.in);

        System.out.print("Principal : ");
        int principal = scanner.nextInt();
       
        System.out.print("Annual Interest Rate: ");
        float aInterestR = scanner.nextFloat();
        
        System.out.print("Period (Years): ");
        byte period = scanner.nextByte();
        
        double mortgage = principal * ((aInterestR*(1+aInterestR) * period)/(1+aInterestR)* period-1);
        

    
    
    }
    
    
    
}