• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Clrify results from SCJP mock exam site

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
i have been doing some mock exams and tried this site
http://valiveru.tripod.com/java/jvaltest.html

the questions looked interesting however when i looked at the answers they were giving
some of them didn't look right
so i want to show them here and see if i don't understand something or that some of the answers they were giving are wrong
and i am not mad.

if some sites do have errors in their answers is it beneficial using them because it will confuse you more
so how can i know which sites are good for learning to SCJP and sites that are not that great.

1.
Select the assignments that compile without giving error




their answer is B,C,D,E - i thought that B was not legal and i checked in eclipse and B gives compile error so whats that about.

2.

Which of the following are valid constructors of the
class named 'SubClass' which extends a class with default constructor




their answer is A,C -- A doesn't seam to be logical(because if you already defined constructor with arguments the empty one will not be valid) and i checked and A gives compile error



3.
Select the valid primitive assignments of the following.





their answer is A,B -- A gives compile error as it should


4.
Which of the following is valid 'if' statement




their answer C,D -- clearly and i checked B is ok also

5.

Select the code segments(assuming is part of valid class) below that compile and run correctly with output : We are Equal



their answer D,F - Checked C also and compiles runs and works like a charm

6.

If you want to create java GUI application using AWT, you constructed a frame calling

Frame f = new Frame();

What methods you need to call on the Frame f to make it visible.





their answer C - i checked and there is no function setSize(boolean) for Frame and it gives compile error in eclipse

7.


Given the following code segments, select the ones that are legal.




their answer B,E -- checked F and it works and regarding B it does work but why 'c =c+i' (C char i integer) does not compile and 'c+=i' does and work

8.


How many String objects are created when we run the following code.



A. 1

B. 2

C. 3

D. 4

E. We can't say.


their answer C - Why is it not B i cant understand

i will appreciate if someone can clarify for me
what is right
thanks
 
Ranch Hand
Posts: 2066
IntelliJ IDE Clojure Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
UseCodeTags when you post coding, use EDIT option to edit you post and put code tags.
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
IntelliJ IDE Clojure Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For Question 1, B is not a suitable answer.
And for 2, if those constructor are only provided, then A is not suitable.
And for 3, A is not suitable answer.
And for 4, B,C,D are the answer.
And for 5, C,D,F are possible solutions.
And for 6, Not related to SCJP API.
And for 7, F is also a suitable answer, and for compound operators, there is a implicit castings.
And for 8, Answer is 3.

Last question is related to String Literal pool, in the String Literal pool, Hello object is created in the pool, and again Pal is created in the pool. Then because of you've concatenate these two object, there will be another String in the String literal pool. So there are 3 objects in the String literal pool. Not in the normal heap. [But String literal pool is also in the heap. But, we are talking it differently.]

And if you want to know further, check it here
 
hillel rosen
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the reply
so i am not crazy and their answers are wrong
this leads me to my next question which is
which sites are good to learn from
sites that have errors in answers can confuse a lot and i prefer not to go there
in the list of sites listed here in java ranch it is listed as a good site so how can i know?


 
Ranch Hand
Posts: 446
1
Eclipse IDE MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@hillel
I think K & B book and the MasterExam provided and the ExamLab are sufficient for the preparation
I did the same
and of course
till the exam keep in touch with the javaranch
be hardcore rancher
that will really really help you a lot
 
hillel rosen
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the help
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
IntelliJ IDE Clojure Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

hillel rosen wrote:thanks for the reply
so i am not crazy and their answers are wrong
this leads me to my next question which is
which sites are good to learn from
sites that have errors in answers can confuse a lot and i prefer not to go there
in the list of sites listed here in java ranch it is listed as a good site so how can i know?



I think, doing more mock exams will be a benefit for you, but don't relay for the answer on them. If you've doubt, then ask the question here. This is fine for you ans as well for us.
 
hillel rosen
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
when i will be more experienced it would be fine doing all the exams i can
but now it will just confuse me if i believe a wrong answer
so i will prefer now to do exams which are reliable
if you have any more sites that you can recommend i will appreciate it
thanks a lot for the help.
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
IntelliJ IDE Clojure Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

hillel rosen wrote:
if you have any more sites that you can recommend i will appreciate it
thanks a lot for the help.



You can trust ExamLab. I don't know about others.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic