Anselme Bender

Greenhorn
+ Follow
since May 22, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Anselme Bender

An idea maybe ...
Make your doGet() calling you doPost()
19 years ago
Hello,
I have been amazed to see that the following is possible :

Is it legal to extends two interfaces within the same statement ?
Thanks
A. Bender
[ September 30, 2002: Message edited by: Anselme Bender ]
19 years ago
I found quiet all of the postings very interesting.
That's why I'll try to qualify for the giveaway.
19 years ago
JSP
This could help :
http://www.valoxo.ch/jr/mocks/mock01a.html
Maybe there is something I dont understand but Q20 compiles and runs.
I think you need the try/catch because the Q20.test() method declares it COULD throw something. So you have to take care of it.
At runtime, as it is the Q20Sub.test() method which is called, the exception is not thrown and then test() works fine.

A guess, maybe the fact that the compiler complains if you don't catch an exception when calling a method which declares one is the same idea than complaining about some unreachable statement.
I mean the folowing where x() doesn't throw any exception:
try {x();}
catch (IOException e) {
niceMethodToGracefullyExiting(); // never reached
}
looks like this :
public void z() {
int i=0;
i++;
return;
i = 22; // never reached
}
Please, note that I'm not a compiler Guru.
[ August 24, 2002: Message edited by: Anselme Bender ]
Question05Sub myref = new Question05Sub();
In this case the test() method is the one of Question5Sub which doesnt throw an Exception. So the compilers will complain your are trying to catch an exception which will never pe thrown.
Question20 myref = new Question20Sub();
In the opposite, in Question20, even if the actual value of myRef is a reference to a Question20Sub (which is legal as Question20Sub extends Question20) it COULD also contain a reference to a Question20 object (the type of nyRef is Question20). So the exception COULD be thrwon and the compiler is happy about the try/catch.
Regards
Hello,
A good start could be the following :
JavaServer PagesTM Fundamentals
Short Course
http://developer.java.sun.com/developer/onlineTraining/JSPIntro/
an then : Start the Short Course

Regards
19 years ago
JSP
Hello Shawn,
What is the overread of using JSTL compared to JSP only ?
Does JSTL need an additional pass of compilation or something like that ?

Thanks in advance
19 years ago
JSP
Hi Ron,
I found the following at this address http://mindprod.com/jglossinterned.html where there is a lot of interesting informations
---------------------------------
Intern and garbage Collection
---------------------------------
In the early JDKs, any string you interned could never be garbage collected because the JVM had to keep a reference to in its Hashtable so it could check each incoming string to see if it already had it in the pool. With JDK 1.3 came weak references. Now unused intered strings will be garbage collected.
Hope this help
19 years ago
From the API documentation :
public java.io.PrintWriter getWriter() throws java.io.IOException
Returns a PrintWriter object that can send character text to the client. The character encoding used is the one specified in the charset= property of the setContentType(java.lang.String) method, which must be called before calling this method for the charset to take effect.
If necessary, the MIME type of the response is modified to reflect the character encoding used.
Calling flush() on the PrintWriter commits the response.
[...continued...]
A. Bender
Thanks to both of you
A. Bender
I have juste passed SCJP and want now got through SCWCD
Will the SCWCD exam stay as it is for a few monthes or, like the coming of SCJP 1.4 exam , is something new under preparation ?
Thanks in advance
A. Bender
You are right Valentin
Thanks again
AB
19 years ago
.............................
[I'm not laying about that]
.............................

Oups ... Understand it as : "I'm not kidding"
19 years ago
Done and not so bad according to some Mocks I made the other day ranking at 52% !!!
However, the amazing is that I got 100% for sections I was afraid of : java.io, java.awt whereas I only got 57% for Threads ....
I passed the examination in place where I was listening to cows (I'm not laying about that) .... near Fribourg in Switzerland
Thanks a lot to all of you, I'll stay in touch for a while as I'll jump to SCWC or SCJD.
Regards
A. Bender
SCJP2
19 years ago