Ana Abrantes

Ranch Hand
+ Follow
since Sep 04, 2003
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 Ana Abrantes

Yes, that's because it's an unchecked exception.
But if you had a catch statement you could have caught that runtime exception.
Because a label must be used with a loop and "l2" is set before a variable declaration not a loop.
Make this change to compile:
If you do an integral division 2 / 3 is 0, isn't ?
So, the rest is 2.

That's your answer: 2%3=2.
Constructors are not inherited.
1 int i=0;
2 while (i++ < args.length) {
3 System.out.print(args[i]);
4 }
In line 2 i has a value and in line 3 it has another.
So, you pass the test in the while, but you print the next element of args.
That's why you got a runtime exception.
Since an anonymous class doesn't have a name, it can't have a constructor, because constructors have the same name as the class.
Static elements are relative to the class not its instances.
You can use them without instantiating the class:
Prod.prmth2();
And the result will be:
prmth2 = 30
[ May 08, 2004: Message edited by: Ana Abrantes ]
RuntimeException and its subclasses are all unchecked exceptions.
Jeroen, don't be so tough!
English isn't my mother tongue and I could perfectly understand what diwakar said.
I think he's used to talk on chats, where people "save" letters!
By the way, diwakar, what I have to say is that I also don't work with Java but this didn't mean I wasn't able to learn Java and achieve my certification.
I took a Java course one year ago and practiced a lot at home.
At the end of the year I decided to take the SCJP exam and last week I passed with a score of 95%.
So, if you really want to get the certification, study and you'll get it!
Yes
Yes
Yes
It is finished only when you click the finish button!
(or the time expires, sure...)
I agree with you, Barry.
The book is just one more aid to achieve the certification.
I had 2 questions in my exam that I didn't learned from the book but also from other sources of study.
One question about Collections had methods from List and Iterator, which both I thought it wouldn't appear on the exam so I didn't bother to study. But, as the answer had multiple choice, I could eliminate the ones I was sure it was wrong...
Another one about threads had daemons, and this I studied from the Heller's book.
So, my advice is the same as yours: don't study from just the book.
Take many mock exams, see the JLS, and, of course, come to javaranch to get answers and to learn more and more!
It seems so (in this text).
In my exam I didn't have any question concerning command line enabling or disabling assertions.
The signature of the method valueOf is:
public static XXX valueOf(String s)
Where XXX is the wrapper class you want return.
For instance:
Integer myInteger = Integer.valueOf("5000");
I'm the newest Java certified programmer!
yuhuhu!!!
I've always come to this site to see the questions everyone is making and to learn with them, of course...
I must thank Kathy and Bert for the wonderful book they wrote, which I used to prepare for the exam and with which I learned really a lot of things about Java.
I also want to thank Dan Chisholm for his site, the excellent questions (and answers, sure!) there helped me clarify many doubts I had.
I'm so happy now... it's very important to me, personally.
Thank you all!!!
[ April 29, 2004: Message edited by: Ana Abrantes ]
19 years ago