How to display current time in java?

    1 answer 1

    Of course, Calendar.getInstance () .

    new SimpleDateFormat("yyyy.MM.dd HH:mm:ss").format(Calendar.getInstance().getTime()); 

    How to display a line on the screen, to explain, I hope, is not necessary.