Creating Menu Using Canvas Class
This example shows how to create the menu and call the canvas class to show the toggle message. The Toggle message will appear when user perform some action like click on a button ("Show").
In this example given below, we will learn how to read character from keyboard and display on standard output device. Method System.in.read() read character from keyboard and returns integer value of the character so we need to change type to char.
Get Time Stamp
In the example given below we will learn how to display current time. getTime() method returns the number of milliseconds represented by Date object that will be used as argument to create object of java.sql.Time class.