Uli Hofstoetter

Ranch Hand
+ Follow
since Nov 24, 2006
Merit badge: grant badges
For More
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 Uli Hofstoetter

The instance of DAO should not be created inside the class under test, but provided via dependency injection, so you can inject the mock when testing and the implementation class otherwise.

Regards,
Uli
13 years ago

M Burke wrote:I'm in Windows


No problem: http://www.cygwin.com/
http://java.sun.com/ -> Popular Downloads: Java SE -> Additional Resources: Java SE 6 Documentation
14 years ago
Your class is too big, does too many things, probabely violates every known principle of object oriented design and programming and will send you straight to maintenance hell as soon as you need to change anything in it.

Do yourself a favour and refactor it, the sooner the better, because every day passing and every line of code added, will make things worse.

I know this is not the answer you were asking for and not the answer you wanted to hear, but its the only reasonable advice.

Btw, as your are using eclipse, there is quite goode rafctoring support into eclipse and i am sure, your unit tests will reduce the pain during refactoring.

Regards,
Uli
14 years ago
Nothing wrong with your approach, i guess Campbell wanted to challenge my ambition to create my own solution.
14 years ago


does not make your code null-safe, as the second test will be conducted only if wireSize is null.

Lets play it step by step:

wireSize is not null => "wireSize!= null" resolves to true => whole condition resolves to true => if branch is executed.

wireSize is null => "wireSize!= null" resolves to false => next condition is evaluated => NullPointerException


I guess you wanted to use and (&&):



14 years ago
You're welcome.

But i am not sure, if i should thank you or hate you for pointing me to Euler project, which i did not know before ... i guess it will cost me plenty of time and nerves in the near future ;)

14 years ago
"fourty" is misspelled, it should be "forty".

Regards,
Uli
14 years ago
Elements of char[] cannot be null.

Check out JLS, Section 4.12.1:
"A variable of a primitive type always holds a value of that exact primitive type."

So you start with an array full of zeros and then overwrite the first 5 elements, the rest is untouched.

Regards,
Uli
14 years ago

sonali sabnis wrote:Thanks Jesper and Uli,

I checked this link http://www.sun.com/training/catalog/courses/CX-310-052.xml
and it is mentioned there in Product Description Section that
"This exam is designed for candidates with experience in the following areas (typically 5 or more years: Application design: concepts and principles, common architectures, integration and messaging, business-tier technologies, web-tier technologies, Java EE technology, patterns and security" That's why I was confused about the pre-requisite.



On the very same page have a look at the details section. "Prerequisites: None".

sonali sabnis wrote:
Would you please clarify?
Appreciate your help!!



Your question was alread answered multiple times in this thread. If you still don't believe us, you best asked sun.

Regards,
Uli
Hi,

there are no formal prerequisites, anybody buying the vouchers can take the examn.

But to pass you should definitely have experience in Enterprise Java and substantiated knowledge about the principles and technologies.

Regards,
Uli
I took the exam, part 3, in december and the time limit was 2 hours. Which gives you 15 minutes for each question.

Keep this in mind and don't waste your time ... 2 hours sounds more than it is.
Please use code tags to make code easier to read.

In which container do you try it to run and what is the whole exception?
Or do you speak of something else when saying "run". Please be more specific when describing errors, this will make it easier for people to help you.


Regards,
Uli

btw ... setContentType is a method of ServletResponse and HttpServletResponse, and not of HttpServlet, of which type your res is.
14 years ago