I'd like to try and help, but I'm a little confused about what the actual problem is!
My understanding of the problem is that the call to window.WriteToScreen( String ) does not wrap long strings being output to the console window.
I wonder if the problem with the code above is one of those...
As an alternative approach, how about the following:
import java.util.Hashtable;
Hashtable hList = new Hashtable();
hList.put( "A+", "\n\nThe numeric letter value is 4" );
hList.put( "A" , "\n\nThe numeric letter value is 4" );
hList.put( "A-"...
In most languages, date parsing and formatting (converting strings to/from an internal date format) can be a complicated business. Java provides several APIs to help:
java.text.DateFormat
java.text.SimpleDateFormat
java.util.Date
java.util.Calendar
java.util.TimeZone
strictly speaking...
If "yourClass" is a Class object represent your class, "yourInst" is an instance of your class, and strMethod is a string containing the name of the method to be invoked, then there are 2 approaches, depending on whether all the methods have unique names or whether at least...
My suggestion would be to use a database table instead of a file - databases are designed for simultaneous multi-process querying and updating - and to use JSP instead of Applets. Then the client processes are all executed on the server and the only thing crossing the network is HTML.
One of...
If your date is stored as a java.util.Date object, then the easiest way I know of controlling its display is to use the SimpleDateFormat object:
import java.text.SimpleDateFormat;
...
SimpleDateFormat sdf = new SimpleDateFormat( "MMM" );
String strMonth = sdf.format( dDate );
...
If...
Date parsing seems to be a difficult area in most languages. I'm looking for a reliable way of doing it using standard Java libraries. My current approach is:
...
public static SimpleDateFormat sdf = new SimpleDateFormat( "dd/MM/yyyy" );
...
java.util.Date dDate = sdf.parse( strValue...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.