Java Reference
In-Depth Information
26.
In Shipment's getRcvHour method, change the return statement to the following so that
any trailing spaces are “trimmed off ”:
return rcvHour.trim();
27.
Change the return statements for the month and day values so that trailing spaces are also
eliminated.
28.
In Shipment's getRcvMin method, insert the following statement before the return so that
minute values less than 10 are padded on the left with a zero:
if ((Integer. parseInt (rcvMin.trim()) < 10)
&& (rcvMin.trim().length() < 2) ){
rcvMin = "0" + rcvMin.trim(); }
29.
In DisplayShip.jsp, define a table with text and JSP getProperty tags to display the
ShipBean's properties as seen in Figure 11-20 .
Figure 11-20.
Search WWH ::




Custom Search