I'm trying to make a program where you enter the amount of minutes you want to time and when it's done it will tell you the timer is done. Here's the code

import javax.swing.JOptionPane;
 
//1 minute = 60,000 milliseconds
 
public class Main {
	String input;
	long timer;
 
	long startTime;
	long currentTime;
	long endTime;
 
 
	public void start(){
 
			input = JOptionPane.showInputDialog("Enter the amount of minutes you want to time");
			timer = Long.parseLong(input);
			timer = timer*60000;
 
			startTime = System.currentTimeMillis();
 
 
			System.out.println(startTime);
 
			timer();
 
	}
 
	public void timer(){
		while(true){
			currentTime = System.currentTimeMillis();
			endTime = startTime+timer;
 
			startTime++;
 
			if(currentTime == endTime){
				takeBreak();
			}
		}
	}
 
	public void takeBreak(){
		JOptionPane.showMessageDialog(null, "Timer Finished");
		System.exit(0);
	}
 
	public static void main(String[] args){
		Main main = new Main();
		main.start();
 
 
	}
}