Hello everyone.
The Java Programming Forums team have been working on this for a while. After months of testing and brain ache, I am happy to introduce the new Syntax Highlighting feature!
This will eventually replace the current code tag we use.
Check this out:
import java.text.SimpleDateFormat; import java.util.Calendar; public class Time { public static final String DATE_FORMAT_NOW = "dd-MM-yyyy HH:mm:ss"; public static String dt; public static String DateTime() { Calendar cal = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW); return sdf.format(cal.getTime()); } public static void getTime() { Time dAT = new Time(); dt = dAT.DateTime(); } }
Lovely or what!
One great feature is that you can click certain keywords and it will take you to the Java API. For example, try clicking String. Very handy.
You can now use this in your own posts by using this BBCode:
[highlight=Java] code here [/highlight]
I will soon be adding a button to automatically paste in the BBCode. For now, it will need to be entered manually.
We have tested this on several browsers but if any of you experience any bugs, please let one of the moderators know as soon as possible.
Thanks.