Win a copy of Spring Boot in Practice this week in the Spring forum!

Matt Schwarz

Greenhorn
+ Follow
since Aug 16, 2001
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 Matt Schwarz

Hey Dominic,
I think you've got it backwards...Float.NAN doesn't equate to ANYTHING, even itself. In fact if you have float x = Float.NAN, this is the only time that the code (x != x) will return true.
Matt
OK, I'm not certain here, but this is what I think:
When you say "new Test().start()" you are creating a new thread. Now there are a total of 2 threads, your main thread (which is going to attempt to execute the remainder of the code in main) and your new thread (which will attempt to execute the code in the run() method). Now, after the line of code that creates the second thread, the main thread will throw an exception...BUT it is not up to the new thread to catch this exception. The main thread may therefore end with errors, but the new thread is still running. This thread will try sleeping for 300 milliseconds (easily accomplished without error) and then finish executing, printing out statement 1.
I hope this was clear (and right),
Matt
Hi Percy,
I remember the More/Next thing also. On some of the questions, the question and all of the answers are too long to fit onto the screen, but they don't want you moving onto the next question having never seen all of the correct answers, so you cannot click "Next" until you've clicked "More", which srolls down to show what you havn't seen (I also noticed that More changed to Next automatically once you scrolled down manually and saw all of your answers).
I'm also don't think the test will let you finish if you didn't give the right number of answers for any question. You can't click too many, and if you click too few, a big red box came up next to the question # on the final review screen.
Matt
Hey everyone,
I passed the SCJP on August 10th, but still havn't gotten the certificate. I have seen plenty of posts saying that it takes up to a month to get the certificate sometimes, but here's my question. I have checked my "Test Status" on the My Certification database thing. It says that my certificate package was queued on August 13th and MAILED on August 14th. How long does it usually take to get the certificate once it has already been mailed out?
Matt
20 years ago
Hey Amy,
The two ARE essentially the same thing .
The description with the subtraction you're probably seeing is something like this:
X%Y:
while (X>Y) X = X-Y
In other words. We keep taking the second operand (Y) away from the first operand (X) until we can't take it away any more. The number we're left with is the result.
e.g. 26%7
26 - 7 = 19
19 - 7 = 12
12 - 7 = 5
Now since we can no longer take away 7 (and have a non-negative answer), the result is 5.
Now think about division with a remainder. X/Y gives us the number of times Y "goes into" X, with a remainder signifying how much is left over. This is exactly what the subtraction example finds. The number of times we subtracted 7 in the above example would be the quotient of 26/7 (3) and the remainder is the same as our result (5).
Matt
Hey Rashmi,
I suppose that all depends on how well you know Java to begin with. Since JQ+ comes with 9 mock exams, one approach you might want to take if you don't want to go through an entire book is to take the first mock exam as a diagnostic test, to determine where your weak areas are, and then study up on those. I don't think it's a great idea to use too many of the JQ+ questions until you are approaching exam-time. The questions really are spectacular indicators of your preparation, and I found that they were not as beneficial a second time around since I managed to remember most of the original answers. I'd say save most JQ+ and Marcus Green's mock exams (http://www.jchq.net) until you are close to taking the test and for earlier in the process use other mock exams listed on this site (go to Gramps, then Java Certification, then "A List of Java Certification Mock Exams") as well as the "Rules Round-up" game here at Javaranch.
Hope that helps, Good luck on your test!
Matt
20 years ago
Whoops:
<a href = <br /> "http://www.jdiscuss.com/Enthuse/jsp/ViewAllResults.jsp">http://www.jdiscuss.com/Enthuse/jsp/ViewAllResults.jsp
Matt
I believe the site you're looking for is:
<a href = <A HREF="http://www.jdiscuss.com/Enthuse/jsp/ViewAllResults.jsp rel="nofollow">http://www.jdiscuss.com/Enthuse/jsp/ViewAllResults.jsp</a>"; TARGET=_blank>http://www.jdiscuss.com/Enthuse/jsp/ViewAllResults.jsp>http://www.jdiscuss.com/Enthuse/jsp/ViewAllResults.jsp
Though at the time of posting this, the server seemed to be down, I'm sure it'll be back up in a few minutes.
Matt
Since the class p1 is declared without any access modifiers, it is given the so-called "default" accessiblity, which is, it it only accessible to classes within the same package as the class in which it resides. P1 is in the MyPackage package, wheras P2 has no declared package (placing it, I believe, in the default package).
Because of this default accessibility, no class outside of package MyPackage can subclass P1. This is why P2 will not compile.
Matt
I might be wrong, but I disagree with Tom. First off, Garbage Collection questions are usually asked "When is the OBJECT created at line X eligible for GC?" "o" is a reference to a string, not an object. The object is the String with the text "true".
An object is eligible for garbage collection when there are no active references to that object. In line 3, a second active reference is created when the first reference in the array oa is pointed at the string. Therefore, when o is set to null in line 4, there is still an active reference.
When oa[0] is set to "" in line 5, there are no longer any references to the string containing "true", so it is then eligible for GC, after line 5.
Matt
20 years ago
Hi Samira,
I bought the RHE (Roberts, Heller and Ernest are the authors. The actual title is The Complete Java 2 Certification Study Guide) at my local Barnes and Noble. Here's a link to buy it online, though:
http://shop.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0782128254
I'm sure Amazon and all of the others have it also....
Hope this helps,
Matt
21 years ago
Hey everyone,
I passed the SCJP last friday, doing even better than I expected I would. I read this forum a lot, using other people's posts to build my confidence and focus my study, so I feel it's my turn to return the favor.
First: what I used to prepare:
I learned a good amount of the Java language in the classroom (I am a Computer Science student and it was the language used in the first programming course), so I am used to test questions about finding syntax errors in some short code. As for actual real-world programming experience, however, I have very little outside the few homework assigments from that course.
To learn the material I used RHE and Exam Cram simultaneously (RHE to learn a chapter each day, Exam Cram to reinforce that chapter the next). After I finished both books, I spent about 2 weeks doing at least 1-2 practice tests per day:
JQ+: Extremely useful. I did the 9 included practice exams, my scores ranged from about a 63 to an 85, so it would seem their claim that the tests are harder than the actual exam holds true. Worth the $20 and then some!
Marcus Green's Exams: Everybody says how great these are. Everybody's right. Marcus, I know you read these posts. Thank you! (As everyone else says, these seem to be the best indicators of how you do on the actual test. I got a 78, 82 and 82 on exams 1, 2 and 3 respectively)
The test breakdown:
Based on the number of questions I know I got wrong, I can say exactly (I think) the number of questions I had in 3 of the sections:
Language Fundamentals: 9 questions
Overloading, Overriding, Runtime Type and Object Orientations: 7 questions
Threads: 7 questions
One complaint I've got about the test: The grades are rounded down! I'm too used to a school where .5 and higher gets rounded up, I guess. A shame, though...53 out of 59 is an 89.8. I'm sure everyone else who gets that grade, like myself would've loved the 90. Oh well, I'm thrilled that I passed, and I think I'm going to try and get SCWCD done in the next 3 weeks or so before I start school again.
Thanks a lot to everyone who posted encouraging messages about their own passing in the last few weeks! Sorry if this message ran on a bit too long.
Matt
21 years ago