This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question from Examlab

 
geeta vemula
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is from DevakaCoorey's Diagonistic test. Q 9
12.
13. StringBuffer sb=new StringBuffer("Prometric");
14. sb.append(new StringBuilder("Test"));
15. sb.delete(4,8).insert(2,"se");
16. System.out.print(sb);
17.

Here asnwer given is prseomcTest, But when i worked out i got prseomcTest.
Can anyone explain me how it is working?
Thanks,
Geeta
 
Punit Singh
Ranch Hand
Posts: 952
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But you have got correct answer, you do not know how did you get that ?
 
camilo lopes
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my opinion to anwer is PromtriTest

is correct?
 
Punit Singh
Ranch Hand
Posts: 952
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No PrseomcTest is correct.


sb.append(new StringBuilder("Test"));
sb=PrometricTest

sb.delete(4,8).insert(2,"se");
sb.delete(4,8) means delete 4,5,6,7
PrometricTest
01234567.........
so sb=PromcTest

sb.insert(2,"se");

insert at index 2
PromcTest
012.......

PrseomcTest
 
Treimin Clark
Ranch Hand
Posts: 757
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It was a recognized error. Read Ankit's first reply on this page.
 
geeta vemula
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the replies. Actually some other errors were also pointed out i dont rememeber those. But i would like to know is devaka coorey's examlab is updated or still the same one. i have downlaoded it somewhere in october. If it is updated then i need to uninstall the current one on my system and again reinstall the new one!!! Any Suggestions..

Thanks,
Geeta Vemula
 
Mahi Mohana
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I get the link to download this examlab? Is that free? meanwhile I try to find out about this on google.. but kindly reply
 
Abhi vijay
Ranch Hand
Posts: 509
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Hima,

Here is the link. Yes it is free and it is a great Exam Simulator.
EXAMLAB
 
Mahi Mohana
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Abhi Vijay.. Its really good.

I downloaded it and I did the one diagnostic as of now. I got only 52%. I need to speed up my practice. Thanks a lot again



 
Devaka Cooray
ExamLab Creator
Marshal
Pie
Posts: 4265
229
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hima Pothana wrote:
I downloaded it and I did the one diagnostic as of now. I got only 52%.


Don't worry, it is a good score. Because my questions are harder than the real Sun exam, as everyone saying.

[edit: enabled BB tags]
 
Mahi Mohana
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Devaka... good to see your reply. I did not expect that you are one of the member in this forum. Great job and no words to describe for the effort you have taken to prepare this kind of wonderful kit. Thanks a ton for free download..

I have a question, when I was doing questions at the end of K&B book on if esle condition.. There was a question like
if {some code}
else {some code}
else{some code} --- I solved the code and when I checked the answer, mine was wrong and it is a compilation error because there is a missing [b]if[/b] after second else..

I know that if- else if- else. That made me to think.. ok I have to very careful about syntax..

Second time, when I was doing SCJP 5 mock Master exam.. there was a question with multiple choices like What methods each I/O classes support.. or what parameters it accepts (This is not the exact question, I am just retyping what I remember)
Eg :choice 1 java.io.File has a method name createFile().
choice 2: java.io.PrintWriter accepts File as its argument..
--
choice 4: java.io.BufferReader has a method called readLine()
choice 5: java.io.[b]b[/b]ufferReader accepts FileReader as it argument.

So, we have to choose which are true, when I saw choice 5.. I got stuck, I know it is true but the class bufferedReader starting with b instead of B.. So this time, I was under the assumption that they want to test whether APi Class name start with small/Cap letters. So I did not select it, but my answer was wrong as choice 5 is
true and it is a printing mistake.

Third time, when I was doing the examlab Diagnostic test,.. I did not remember the code.. There is a question
class A{}
class B extends [b]class[/b] A { some code and logic}

I have seen that.. but hard to guess whether it is a printing mistake?? or is it testing how to declare when a class is sub-classed??

My question is why Sun want to test such questions??? If the question is more specific to how to declare a if-else if -else condition or how to sub-class a class or how to declare the class thats implementing an interface?? Then, It is good to test with different syntax... choices and to choose among them..

But If such syntax is mixed with some serious code.. it is more like testing how well your eyes are scanning throughout the code??

Also, a serious test- taker does not know how to declare a if -else or a class declaration ?? ..

I guess I making you read such a big question of mine ..

Once again, your work is so good, I will take time to announce everywhere and to everyone I know....

Cheers
Hima

 
Devaka Cooray
ExamLab Creator
Marshal
Pie
Posts: 4265
229
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hima, thanks for you best wishes.

Well, I understood what are you saying about. However, this is the way of how Sun make their exams, especially for the programmer certification. But I don't think it is too bad!

Anyone can spend a time and read the K&B book completely, do practices, do mock exams, and finally understand all the concepts of Java programming. Yes, now he know 100% programming concepts. But can he really build a software program? If he can't do that, how can someone certify he as a programmer?

SCJP is an exam, which Sun certifies you as a programmer; yes really as a programmer! Therefore, Sun need to check whether you are qualify to do that. In addition of knowing all of the programming concepts, a programmer need some additional experiences and abilities. As one example, a programmer must have an ability to quickly identify errors, bugs, and malfunctions, especially at the debugging part. In this case, he must have a good eye to scan through the code and catch the point (it may be tricky). If he can't do that, he'll say "what a stupid language, I wrote correctly, but...."

Sun's way of testing this is, they made their questions trickier, especially for the SCJP exam. You are expected to be qualified as a professional programmer to get certified from exam.

It is possible that you are not yet a professional programmer; but that is why mock exams are available. Keep in mind that you must tune-up your eye to catch tricky points on the exam. The way of tunning up is, practicing and doing a lot of mock questions.

I made my questions more trickier, for the purpose of improving this ability; however, I didn't make any question out of the SCJP objectives. So, keep practicing.

Warm Regards,

Devaka.
 
Treimin Clark
Ranch Hand
Posts: 757
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nice explanation, Devaka.
 
Mahi Mohana
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Devaka, for your time to explain me the reason.

Yes, I agree with your reasoning. I was complaining may be I was upset for losing points on questions I know but for not scanning the questions properly.

Regards
Hima
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic