matt love

Ranch Hand
+ Follow
since Jan 25, 2010
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 matt love

I have a couple html:radio tags, with values yes and no:

The html reads as :

Under certain conditions, when the user changes the state of the radio button, I display an alert, and, using a javascript function, I attempt to reset the value of the button to where it was before the user changed it. This last step doesn't seem to be easily done.

If the yes button is the default, and the state of the button is yes before the user changes it to no, the code works fine and the button immediately reverts back to yes.

If the no button is the default, and the state of the button is no before the user changes it to yes, the alerts show no and yes, in that order, but neither button is shown as selected at the end of execution. It should show no as selected.

How do I show the no button as being selected?

I'm sorry I'm unable to post some of the code.

I have to use IE.


I'm trying to figure out the handoffs in a Struts 1.2 environment.

When a JSP form is submitted by a user and the ActionServlet is eventually invoked, receiving a HttpServletRequest and a HttpServletResponse, is the Request object being passed to the ActionServlet the embodiment of the JSP?



public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {

process(request, response);


9 years ago
Great answer Gurpeet.



from Sierra and Bates.

Which of the following invocations will run without exception? (Choose all that apply.)
A. java Motel13
B. java -ea Motel13
C. java -da:Hotel Motel13
D. java -da:Motel13 Motel13
E. java -ea -da:Hotel Motel13
F. java -ea -da:Motel13 Motel13

Answer (for Objective 2.3):
A, C, D, and F are correct. When assertions are enabled, the Motel13 class will throw
an AssertionError, the Hotel class will not. Invocations A, C, and D do not enable
assertions for Motel13. F is correct because although assertions were enabled, the "–da"
switch selectively disabled assertions for the Motel13 class.
B and E are incorrect because assertions are enabled for Motel13.

Why is E not a correct answer? I read "java -ea -da:Hotel Motel13" as enable assertions for all classes and disable assertions for classes Hotel and Motel13.



class java.lang.Integer

Thanks Bear.
10 years ago
If Number is an abstract class, why does the following print the affirmative?

Is the int being boxed to an Integer?



10 years ago
Hi Gurpeet.

It may have come from an edition of:

A Programmer's Guide to Java (tm) Certification [Paperback]
Khalid A. Mughal (Author), Rolf W. Rasmussen (Author)

try: for something of a confirmation.

It's also possible it came from Gilad Bracha who is also a good writer:


Good luck.


This question is based on a question from CertPal.

Doesn't type Object qualify as a type capable of receiving ? super Number?



I should have mentioned that I have also found Enthuware mock exams helpful.


Hi Pratik.

The Mughal is also a good book. And it is certainly beneficial to get more than 1 credible perspective on any subject. But it really comes down to which helps you learn the material better and that's a personal call.

My experience suggests however, reading books will only take you so far. The mock exams help me to focus my thinking and help me identify the areas where I'm weak. Having identified an area in which I am significantly weak, I then utilize the books and the internet as resources to tell me what I need to know.

When you say, "I know that I am dumb but giving lots of mock test can really help me to score good marks in SCJP exam ?", you're obviously smart enough and determined enough to want to take this test.

A lot depends upon how well you knew Java when you started preparing for this test and also how much time you have available to prepare for it going forward. I think many would agree with me when I say passing this test is difficult. I suspect there could be many professional Java programmers, who have been programming in Java for years, who would not pass this test on their first attempt.

If you don't have a reasonably solid base of Java knowledge. or OOP in general, preparing for this test may not be the best approach to learn Java.

Good luck.


Hi Pratik.

Although I have passed the Oracle Java Associate exam, like you, I am also preparing for the professional exam, so, for what it's worth.

Patience, read the material, variety of mock exam providers and undertake a substantial number of mock exam questions.

There seem to me many mock exam providers. Google searches reveal sites like · CertPal, Exam EPractize Labs, Dan Chisholm's Test Suite, Marcus Green's Site, Whizlabs Java Certification Kits, JavaBeat, Certification Kit and the list goes on. I've worked mostly with B & S, Whizlabs and CertPal.

The B & S questions seem to be consistently the most difficult, partly because they often require more than 1 correct answer. How that level of rigorousness relates to the actual exam, I'm not sure.

I've found it helpful to document my incorrect answers so I can revisit them numerous times until I feel more confident in my understanding of them.

Ive also found it somewhat helpful to keep track of my scores so I can notice any progress when I retake an exam a month later.

Also, depending on your background, this undertaking could take a while but, presumably, it will be worth the investment of time.