do we need to follow any specific way to writing a java code for converting in Javascript or ?
let say I need a function which returns me the time & Date in javacript. in a simple way we write a main methods and use Date class of util package to get this. code Example:
what would be the output of this program in javascript file by using GWT? is this file will convert into javascript?
You will need to follow the GWT way, as you will be using the Java to Javascript compiler provided by GWT to actually do the conversion. You will not be using main methods, but will instead use GWT modules and entry points.