String, text, numbers, I/O I part
Answer: neither statement is true! It is not a bug and you are Ok! Just please read
more carefully JavaDoc next time.
It is written there for getBoolean ():
"Returns is true if and only if the system property named by the argument exists and
is equal to the string "true".
(Beginning with Java 1.0.2, the test of this string is case insensitive.)
A system property is accessible through getProperty, a method defined by the
System class."
So you didn t use this method properly...
Use instead:
public static Boolean valueOf(String s)
This method returns the boolean value represented by the specified String. A new
Boolean object is constructed. This Boolean contains the value true if the string
argument is not null and is equal, ignoring case, to the string "true".
example:
boolean x= true;
(Boolean.valueOf(x)).booleanValue()
gives you proper boolean (not Boolean!) value
Q: I m working on a java project and looking for a better API that can generate
PDF, work with Excel, Word documents... Where can I find it?
Answer: We have a list here:
http://www.javafaq.nu/java/office/index.shtml
Q: I m looking for a rich text editor that I can embed within a web page, and allow
users to enter rich text that I can in turn store as HTML.
I ve seen similar applets through web based e mail clients. I d appreciate it if
someone could point me in the right direction!
Answer:
Try Swing, by Robinson, Manning Publication. You could probably adjust the code to
fit into the applet style.
It is here
http://javafaq.nu/java/free swing book/free swing book chapter20.shtml
John
Q: I want to have a while loop execute for a maximum of n seconds or until it
receives something in an input stream. How would I do this?
Answer: I think you could do it this way:
********************************************
InputStream Input=null;
int n=10; /*Number of seconds to wait*/
/*initialize you input stream*/
...
/*Now start you while loop*/
long lStart = (new Date()).getTime();
file:///F|/a_jsite/350_tips/stings_text__date_numbers_io I.htm (5 of 7) [2001 07 08 11:24:59]
footer
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved