0

who can I read the RUN ?

Hi to all .


I now start learning the java language .

I have this program :

import java.util.*;

class WTime
{
	public static void main(String[] arguments)
	{
		GregorianCalendar now = new GregorianCalendar();
		int hour = now.get(Calendar.HOUR_OF_DAY);


		if (hour < 12)
			System.out.println("Good morning.\n");
		else if (hour < 17)
			System.out.println("Good afternoon.\n");
		else
			System.out.println("Good evening.\n");

		
	}
}

If I make the run , the run screen is disable quickly , I can not read it .

I try to put the command that asked the user to enter any thing before end . but all the my tries is wrong .


I need another solution please .

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by ~s.o.s~
0

I'd assume that you are having problems viewing the output of your program, yes? In that case reading this might help. Also, take a look at the forum sticky for more resources to get started with Java.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.