Louie Cheung

+ Follow
since Dec 25, 2006
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Louie Cheung

this code simply takes 2 integer from user and write them on file, but the output file becomes rubbish such as:
how do i fix this? thanks

[edit]Add code tags. CR[/edit]
[ November 17, 2008: Message edited by: Campbell Ritchie ]
13 years ago
it was harder than i thought, a few questions weren't covered in HFSJ but nonetheless a great book!
im glad i cleared it with 81%
HFSJ and whizlabs was all i used
now wheres a good place to find a job as java developer in toronto?
and whats my salary expectation (i have no job experience)?
thank you all cheers!
14 years ago
i found the typo thanks a bunch guys
how do i view web.xml in explorer?
i tried
both didn't work

and how do i view log?
sorry i'm completely new to this, thanks
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"



<param-value>Great Dane</param-value>


this is the error i got in the browser:

HTTP Status 404 - /listenerTest/ListenTest.do
type Status report
message /listenerTest/ListenTest.do
description The requested resource (/listenerTest/ListenTest.do) is not available.


i compiled the three classes Dog.java, ListenerTester.java, MyServletContextListener.java successfully under C:/Tomcat5/webapps/listenerTest/WEB-INF/classes/com/example
and also web.xml under WEB-INF

what seems to be the problem?
what makes it worth it to learn Tomcat 6 when you already know Tomcat 5, what are the major benifits?
14 years ago
would like to thank everyone on ranch who helped
not a great score but im proud i made it all by myself
a tip for everyone taking the test
java ranch, kathy book and whizlabs is all you need
14 years ago
this piece of code is from whizlabs 5.0, i want to know if the real exam requires knowledge of the FilenameFilter Interface or the listFiles method in the File class? i've noticed quite a few questions in whizlabs that require knowledge not talked about in the K.S book, should i waste time studying them or has the K.S book covered everything i need to know for the exam? please advice thanks

Originally posted by Burkhard Hassel:
Louie Cheung tried



yes i tried, and super too Burkhard Hassel
i tried to change the return type to <? extends TestArrayList> but still i get compiler error like this:

java.util.ArrayList<capture of ? super TestArrayList>
output = processList(output);

why? i know changing the parameter to <TestArrayList> would work but i want to know how the wildcard works here, thanks a bunch
i wrote this code myself and i couldn't get it to compile with the <? super TestArrayList> method argument type, <? extends TestArrayList> doesn't work either is it because im adding to the list inside the method?, it seems that the problem is from the return type? please advice

indenting repaired by Bu.
[ September 03, 2007: Message edited by: Burkhard Hassel ]

Originally posted by Giovanni Murguia:

You could try something like:


i'm getting compiler error for the above code as follows:

cannot find symbol
symbol : method setCharAt(int, int)
location: class java.lang.StringBuffer
sb.setCharAt(0, letter+1);

i tested if i change it to the following it compiles fine:
sb.setCharAt(0, letter);

so what's wrong with the +1 there?