Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link


+ Follow
since Jan 26, 2000
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 tricktan

Does anyone here have sample code for uploading any file to a BLOB column ?
I found the solution,
you need to setHeader();
setContentType(application/octet-stream) <--generic application
some pointers too.. don't put any HTML or text tags, this will screw up the application file binary output stream
22 years ago
I'm trying to write a JSP that pulls a file (i.e. Ms Word Doc file) from a database and pushes it to the client for download.
I tried to use:
and I can only see my web browser show binary charactes .
How do I make the browser recognize the binary chars. as a file ?
22 years ago
Just curious , how many among you who passed the exam , got off from try number 1 ?
I heard that SCJP exam is harder than i.e. VB , yet I heard a lot of people doing take 2 or take 3 on that exam.
When will I need to explicitly add 'L' or 'l' to a number ?
I got from one mock exam that "
long l = 100; is illegal ?!
It works when I tired compiling .
In relation to that ..
char c = 100 -- works too ?! I thought that char only accept 'x' or '\uxxxx' as value ?
What exactly is happening here ?
22 years ago
I'm having problem understanding the bit operations in Java. Can anyone please give me some links to study on ?
The issue about converting negative number to 'larger' primitive type in particular confuses me. Since it appeas like the 'excess' bits produced by using the primitive type are all turned to 1's . How can Java distinguish this as a numeric bit from a sign bit ?
22 years ago
There is a software called Chillisoft that will allow you to run your existing ASP apps on Linux/Apache(or Netscape Fast Track I think).
22 years ago
to my understanding :
n++ == ++n
(y=x++) != (y=++x)
---- and -----
operanDS are evaluated right to left
while operationS are evaluated from left to right
how come :
int N = 2;
int method(int N){
return 0X100 + N++;

yeilds 258 ??
Shouldn't N be 3 before added to 0X100 ?
Thanks for input.

22 years ago

Originally posted by Buffalo Bill:
Illegal becaue you cant mix declaration and intializing together.

can you expound a little on your answer. I got the same explanation from the book, I just can't grasp the diff. between
(int i=0 ; ..)<the legal one> and an
(int i=0 , int j=0; ..)<the illegal one>
It does seem like both are doing declaration and initialization to me.

Originally posted by Paul Wheaton:
I don't see how the first one is legal. The initialization is "int =1" - I don't think thta will fly.

oops .. it's 'int i =1'. typo.
Is it safe to say that there simply can't be
(int i = 1 ; ..) in the for loop ?
I seem to see lotsa example using this style.
here's a code:
int j = 2;
case 2:
case 2+1:

the "case 2+1:" is legal according to my book . I thought we can't use expression in 'case'. Can anyone explain why ?
for (int =1 ; boollean_condition ; interation)
is legal . but why is this illegal ?
int i =0;
for ( i =1, int j = 0 ; boolean_cond ; iter)

Can you + 2 non-String objects together ? Will this call the .toString() as well ?
The Heller book made some confusing conclusion on this area. One bullet says "..must have at least one String object operator ... otheriwse illegal" and second bullet "If both objects in operators are non-String .. non-String object is converted to String .."
Strangely, both Heller and Brigden's book makes representation that String when used as :
String a = "xxx";
String b = "bbb";
uses 1 memory location only (memory pool).
While when used as :
String a = new String("xxx");
String b = new String("bbb");
each String is created in their own memory space.
Therefore ..
using '==' on String will always yield yes.
Any opinion on this ?
More or less this is as much as I have gathered on diff between 'equals' and '=='
..By default 'equals()' and '==' functions by telling us if object referenceD is similar.
Can someone give us some 'rule of the thumbs' on how it functions against Objects (i.e. String, StringBuffer and Wrapper classes) as well as primitives.

It gets really confusing after reading a couple of books.