SCJA & SCJP Questions

Hi all, I would like to clear out a few points/questions if possible.
First -
I'm a C++ programmer but want to extend my knowledge in learning Java therefore im thinking of taking the Sun Certifications, which would start from SCJA. Now, would the SCJA study guide be appropriate to achieve this certification or would I need addional training software, like the bundle set "Java Entry Level Certification Solution (CDJ-JAVA-NOV)" provided by Sun itself.
Second -
Considering the fact im rather new to Java and its technology, ive been reading about Java 6.. would it be ideal to wait a little and study the 'new' version before moving into the Java 5 certifications.. just to be with the 'latest' technology or is Java 6 just a small extension/upgrade upon Java 5 ?
Third -
As my main aim is to reach the SCMAD Certification level, I would like to know what good books are available for the SCJP certification exams, as stated in the main question (SCJA and SCJP both rely in the Java SE technology) , the bundle set kinda covers the Java SE aspects and was wondering if its feasible enough to just purchase that training kit to study that course material or if there is any other relevant/suitable material instead that I should go with.
Many thanks and really appreciate your help.

on the contrary, it means you can memorize facts.no
understanding is impliedNot even close to true. The test is filled with
questions that present code and questions that ask if
the code will it break at compile time, runtime, or
run just fine, etc. What will the output be, etc.
Aside from memorizing data types, you must be able to
compile and run code in your brain. To me this
implies and understanding. And as most people are
reliant upon compilers and runtime errors to write
solid code, it's not easy. I think you should really
have a look at the exam and let's see how well you do.I'm not saying it's easy, and by "no understanding is implied" I mean understanding of writing software, not the mechanics of the language. my point is that SCJP et al are meaningless in terms of deciding someone's employability, since what they test is largely academic. as you say, people have compilers and tools to lean on for details such as syntax errors, so what use is testing that knowledge manually? a wide vocabulary is no indicator of a good author, a good story-teller, is it? show me the engine in your car, and I can tell you what most components are called, what they do and how they work. ask me to actually fix something in there, and I'm completely lost. the understanding of the mechanics is not enough
like it or not, knowing the syntax of the language, and the rules about what will and won't compile, etcetera, is just memorizing facts. being able to produce working complex software is a different skill, which these exams do not examine. nothing wrong with that in itself, but the danger comes because so many employers don't understand this, and see SCJP/whichever as proof that the person holding it is competent. it isn't, and I've met enough java cert'd people to know this

Similar Messages

  • Need clarification: SCJP questions

    The following code when pasted in eclipse is giving a compilation error but the answers are as given below!!
    Please explain.
    Question 1
    Given:
    11. static classA {
    12. void process() throws Exception { throw new Exception(); }
    13. }
    14. static class B extends A {
    15. void process() { System.out.println(�B �); }
    16. }
    17. public static void main(String[] args) {
    18.A a=new B();
    19. a.process();
    20.}
    What is the result?
    A. B
    B. The code runs with no output.
    C. An exception is thrown at runtime.
    D. Compilation fails because of an error in line 15.
    E. Compilation fails because of an error in line 18.
    F. Compilation fails because of an error in line 19.
    Answer: F
    Question 2
    Given:
    11. static class A {
    12. void process() throws Exception { throw new Exception(); }
    13. }
    14. static class B extends A {
    15. void process() { System.out.println(�B�); }
    16. }
    17. public static void main(String[] args) {
    18. new B().process();
    19. }
    What is the result?
    A. B
    B. The code runs with no output.
    C. Compilation fails because of an error in line 12.
    D. Compilation fails because of an error in line 15.
    E. Compilation fails because of an error in line 18.
    Answer: A
    Thanks in Advance!!

    Please correct me if I am wrong as I am in the learning process.Casting the reference to a B type allows the code to compile because B.process() doesn't throw an exception and the javac compiler is smart enough to catch that. However, catching the exception or declaring main as throwing it also allows the class to compile; the solution does not require casting. Examples:
    class A {
        void process() throws Exception {
            throw new Exception();
    class B extends A {
        void process() {
            System.out.println("B ");
        public static void main(String[] args) {
            A a=new B();
            try { a.process(); } catch (Exception e) { /* handle */ }
    }Or: class A {
        void process() throws Exception {
            throw new Exception();
    class B extends A {
        void process() {
            System.out.println("B ");
        public static void main(String[] args) throws Exception {
            A a=new B();
            a.process();
    }~

  • Help with SCJP Question

    Hi,
    I don't understand the answer to the question below. Why doesn't it print "pre " first since this is the first line of main?
    I'm not sure I understand the order of the rest either. I've read the chapter that goes with this but still can't understand it.
    Hope someone can help.
    Thanks
    Question:
    Given:
    class Bird {
    { System.out.print("b1 "); }
    public Bird() { System.out.print("b2 "); }
    class Raptor extends Bird {
    static { System.out.print("r1 "); }
    public Raptor() { System.out.print("r2 "); }
    { System.out.print("r3 "); }
    static { System.out.print("r4 "); }
    class Hawk extends Raptor {
    public static void main(String[] args) {
    System.out.print("pre ");
    new Hawk();
    System.out.println("hawk ");
    What is the result?
    A. pre b1 b2 r3 r2 hawk
    B. pre b2 b1 r2 r3 hawk
    C. pre b2 b1 r2 r3 hawk r1 r4
    D. r1 r4 pre b1 b2 r3 r2 hawk
    E. r1 r4 pre b2 b1 r2 r3 hawk
    F. pre r1 r4 b1 b2 r3 r2 hawk
    G. pre r1 r4 b2 b1 r2 r3 hawk
    H. The order of output cannot be predicted.
    D is correct. Static init blocks are executed at class loading time, instance init blocks run
    right after the call to super() in a constructor. When multiple init blocks of a single type
    occur in a class, they run in order, from the top down.

    The static initializer blocks in the Raptor class are executed when the Raptor class is loaded. This is not the same time as an instance of a Raptor (or derived class) object is created, but at class-load time. This happens before the main method is executed, because in order to execute main, the VM first had to load the Hawk class. To load the Hawk class, it had to load the Raptor class (since Hawk extends Raptor). It also had to load the Bird class, but that class has no static initializers, so that didn't affect anything output.

  • SCJP confusing question

    Hello guys,
    Recently I came across one web-site with mock-up SCJP questions. One of the questions and especially provided answer to it really grabs my attention:
    Can one object access a private variable of another object of the same class?
    Answer: Yes.
    Private means "private to the class", NOT "private to the object". So two objects of the same class could access each other's private data.
    If it would be true it violates the encapsulation principle of OO. Can you please explain this question/answer because it is really confusing me.

    All kidding aside here - ask yourself: "Why would I want to make anything private in a class?". Then you might answer "Well, for one thing I do not want to be able to de-stabilize the class when I use it for what it is."
    An example of such use is any use of the API classes from SUN. No instantiated Object from these has access to the private members, unless though public methods - which control such access.
    But you might ask: "And why would I want to take that ability away from the class itself?" Well: "In answer you maight say that you would not want to, and continue by saying that's not what you mean."
    Well since one would need to build in that capability - the previous example used an inner class with a change method - this is not the same as allowing outside access. If you tried to do something like from another toplevel public class without any public alteration methods in the member class you couldn't do it - you'd get a "x has private access in y" type message.
    ~Bill
    .

  • SCJP System.getProperty()

    I am having problem with a scjp question:
    public class vv{
         public static void main(String[] args){
              String myProp = System.getProperty("prop.custom");
              System.out.println(myProp);
    suppose it can complie if I use:
    System.getProperty("prop.custom");
    but there is java.lang.ClassNotFoundException: prop.custom=gobstopper
    What's wrong?

    Welcome to the Sun forums.
    crunchor wrote:
    ..but there is java.lang.ClassNotFoundException: prop.custom=gobstopperHuhh?
    public class vv{
         public static void main(String[] args){
              String myProp = System.getProperty("prop.custom");
              System.out.println(myProp);
    andrew@pc1:/media/disk/proj$ javac vv.java
    andrew@pc1:/media/disk/proj$ java vv
    null
    andrew@pc1:/media/disk/proj$
    What's wrong?Which brings me back to - huhh?
    BTW - Please use code tags when posting code, code snippets, HTML/XML or input/output. The code tags protect the indentation and formatting of the sample. To use the code tags, select (highlight) the sample and click the CODE button.

  • Syllabus/Topics for Sun Certified Instructor for Java Programming Language

    Hi,
    What is the Syllabus/Topics for Sun Certified Instructor for Java Programming Language ?
    At the following link
    http://www.sun.com/training/catalog/instructor/java.html
    detailed syllabus is not there.
    I am unable to find the details in Sun site even after search through google.
    Please help in this regard.
    Thank you for your kind consideration.

    Sir,
    thank you for your response.
    technic  wrote:
    I'm not sure what you mean by Syllabus/Topics?For SCJA/SCJP/SCWCD/SCBCD/SCDJWS/SCMAD/SCEA
    I am able to find the detailed syllabus for the exam by clicking on the respective certification link at the following link
    http://www.sun.com/training/certification/java/index.xml
    for example: for SCJP,
    http://www.sun.com/training/certification/java/scjp.xml
    http://www.sun.com/training/catalog/courses/CX-310-065.xml
    these links are providing exam objectives, number of questions, exam duration , fee details etc.
    But for
    Sun Certified Instructor for Java Programming Language Course (SL-275)
    I am unable to find such details exam objectives (syllabus), no. of questions, exam duration, etc.,
    even, the following link
    http://www.sun.com/training/certification/objectives/index.xml
    is providing details of all other certifications except
    Sun Certified Instructor for Java Programming Language Course (SL-275)
    thank you for your kind consideration.

  • I am going to sun certification exam 1.5 se

    how to prepare and which notes more use ours
    i need syllabus

    Here are some more links for your ref..
    Java Technology Certification -
    http://suned.sun.com/US/certification/java/
    Starting point for Sun's Java technology certification.
      jCert - http://www.jcert.org/
    Learn about initiative to recognize Java certifications across industry vendors.
      SCJP 1.4 certification primer -
    http://www-106.ibm.com/developerworks/java/library/j-scjp/
    Outlines the new programmer certification exam with suggestions for preparation, sample questions and links to resources.
      Whizlabs - http://www.whizlabs.com/jwhiz.html
    Test simulators for Sun Java Certification Exams: SCJP, SCWCD and SCEA [Commercial]
      JavaPrepare - http://www.javaprepare.com/ Tutorials, mock exams and other preparation material for SCJP and SCWCD.
      Marcus Green's Java Certification - http://www.jchq.net/ SCJP exam resource with tutorials, mock exam and community features.
      Absolute Java - http://www.absolutejava.com/ Collection of tidbits to prepare for SCJP exam.
      Java Certification Webring -
    http://i.webring.com/hub?ring=javacert
    Web-ring of sites involved with certification.
      Bill's Java Certification Resources -
    http://www.lanw.com/java/javacert/default.htm
    SCJP mock-tests and links to other resources.
      Levteck.com - http://www.levteck.com/ Includes list of certification books, study aides, links for mock exams and salary surveys.
      Java Guru: Java Certification Forum Home Page - http://www.jguru.com/forums/JavaCertification
    Forum to pose and view the who, what, where, why and how questions on Java certification.
      Wah! Java - http://www.geocities.com/wahjava/ Contains topic-wise mock tests, tips from those who passed, recommended books and links to other testing/java resources.
      Certified Java Programmer Mock Exam (310-025, 310-035) - http://www.danchisholm.net/ Contains mock exams and tutorials for SCJP exam.
      Certification: The Java Mock Test -
    http://www.aniyog.com/java/certification.htm
    Offers free applet based mock exam for SCJP2.
      VoodooExam - http://www.geocities.com/gnashes30/java/mock.htm
    SCJP mock exam engine with facility to add new question/answers.
    Needs jdk1.2.1 or higher [download].
      Free Java Certification Training -
    http://www.michael-thomas.com/
    Contains mock tests, source code, resources for Sun Certifications, resources on Web-development and UML.
      SCWCD Exam Review -
    http://courses.coreservlets.com/Course-Materials/15-Web-Component-Certification.pdf
    Review notes for the Sun Certified Web Component Developer exam.
    [PDF]
      Jiris - http://www.jiris.com
    Contains mock exams, links, forum, code examples and other SCJP/SCWCD resources.
      JavaCaps Home Page - http://www.javacaps.com/ SCJP, SCWCD resources including tutorials, FAQs, Mock Exam and links.
      JavaCoding.net - Certification -
    http://www.javacoding.net/certification/
    Certification information and mock exams.
      Sun Certified Java Programmer sample test paper! - http://www.geocities.com/skmajji/Main.html
    A practice test for SCJP comprising of 30 questions with answers.
      Anilbachi Java Certification Resources - http://www.anilbachi.8m.com/ SCJP tutorial, mock exams, objectives, mock exam links and discussion forum.
      Mock Exam - http://www.valoxo.ch/jr/mocks/mock01a.html
    Javascript based SCJP Mock Exam.
      withmilk.com - SCWCD mock exam -
    http://www.withmilk.com/scwcd.jsp
    Offers mock Sun Certified Web Component Developer exam.
      Sun Certified Programmer Examination Revision Book - http://indigo.ie/~dywalsh/certification/
    SCJP Tutorial based on Sun's Objectives.
      Enthuware - http://www.enthuware.com/ Test simulators for Sun certification exams. [Commercial]
      The Java Skinny - http://www.acmerocket.com/skinny/ Contains sample questions, SCJP exam objectives with code examples and other resources.
      Java Quick Reference - http://www.janeg.ca/index.html Comprises of concise study notes for SCJP exam and other links.
      About.com - Java Certifications -
    http://certification.about.com/cs/freequestions/index.htm
    Explore information and links for Java and Sun certifications.
    Includes articles, practice tests, software reviews, book reviews, and forums.
      Java Certification Study Group -
    http://groups.yahoo.com/group/javacertstudy/
    Study community with forums, chat and resources.
      Universal teacher -
    http://www.geocities.com/rameshchhabra2002/Java/certification.htm
    SCJP exam simulator containing 600 questions [Download].
      Java Certification Study Notes -
    http://www.geocities.com/velmurugan_p/
    SCJP & SCWCD study notes, resources and tips.
      Tipsmart.com - http://www.tipsmart.com/ Contains interactive quizzes, pitfalls, FAQs by programmers, list of integrated development tools.
      JavaQuestion Bank - http://javaquestion.tripod.com/ Includes general and certification questions and other java resources.
      SCJP Preparatory Questions -
    http://sanjayahuja.tripod.com/tech/scjp/scjp.html
    SCJP questions, summary, exam details and resources collected from various sites.
      withmilk.com - SCJP2 mock exam -
    http://www.withmilk.com/scjp.jsp
    Offers mock SCJP exam.
      Learn + play Java - http://www.jai.ch/ Interactive, downloadable course for SCJP with built-in Java source interpreter. Work and experiment with class libraries using the tests and JLS Summary.
      Java Certification Exam Questions -
    http://home-1.tiscali.nl/~bmc88/java/javacert/
    SCJP mock tests, exam notes and other resources.
      SCJP2 MockExam -
    http://www.geocities.com/rraje_2000/MockExam.html
    60 questions mock test [Download].
      Dallas SCJD Study Group -
    http://www.geocities.com/developergrp/
    Developer exam resources including FAQs, guidelines, presentations, free books and discussion forum.
      JSecure - http://www.netcraftonline.com/ Java Certification exam simulator. [Commercial]
      Online Java - http://www.geocities.com/korayguclu/
    Contains excerpts from an ongoing SCJP book, exam information, notes and links to Mock exams/resources.
      Radhika's Java and HTMl Home -
    http://www.geocities.com/r_palwai/scjp.htm
    Contains links to SCJP resources.
      Prasks Resources -
    http://prasks.webahn.com/architect/scja.html
    Sun Certified Java Architect resources and experiences.
      Certification4Career - http://www.certification4career.com/
    Contains study guides, mock exams, discussion board and links for SCJP.
      Quick Java - http://home.worldonline.dk/qjava/ Contains a Java lookup reference and test-simulator based on a book.
      go4java- Java Certification Site -
    http://www.mycgiserver.com/~go4java/
    Includes SCJP experiences, FAQs, mock exams, tutorials and links to other resources.
      Java.CertifiedProgrammer.com -
    http://java.certifiedprogrammer.com/
    Contains study aides, news and mock exams.
      Abhilash's java quiz site -
    http://www.angelfire.com/or/abhilash/
    Comprises of set of nine practice quizzes for SCJP exam with answers.
      Oracle Certified Java Developer -
    http://otn.oracle.com/training/certification/jdeveloper_ocpds.html
    Starting point for Oracle Certified Java Developer OCP program.
      Java Programmer Certification -
    http://www.geocities.com/technofundo/tech/scjp/scjp.html
    SCJP Revision notes, links and other resources.
      j-think - http://jamal.pisem.net/scjpnotes.htm
    Contains SCJP notes.
      Java Certification (SCJP) -
    http://www.akgupta.com/Java/certification.htm
    Contains SCJP mock exam, tidbits, exam notes and links to other resources.
      Sun Java Certification Notes -
    http://216.239.33.100/search?q=cache:http://www.miindia.com/tech/javacert.htm
    Contains concise preparation notes.
      Cramsession -
    http://studyguides.cramsession.com/cramsession/Java/
    Study guides for Java Certification exams; needs (free) registration.
      JCertify - http://www.enterprisedeveloper.com/jcertify/
    Java Certification exam simulator with tutorials and integrated training content. [Commercial] If you had gone thru all these sites, you would be the Master in java! :-)
    Good Luck!

  • Can a method implemented from interface be native ?

    This is a bit of a SCJP question.
    interface One
    public void someMethod();
    public class One_impl implements One
    public native void someMethod();
    Assuming that the native method is not provided in any local library, an attempt to compile and run the above lines
    of code will cause
    1. Compilation error - implimentations can never be native.
    2. Compilation error - method not found in local libraries.
    3. Runtime Exception - method not found in local libraries.
    4. Compilation successfull but runtime error is thrown if and only if the method someMethod of class One_impl is
    called
    My question is can a implemented method be native ?
    I am totally blank about native methods in Java.(Does this dismiss the right to put a question and study native methods in Java first ?)
    Thanks.

    ejp wrote:
    My question is can a implemented method be native ?Yes.
    I am totally blank about native methods in Java. (Does this dismiss the right to put a question and study native methods in Java first ?)It does suggest that you could have read the JLS first.Maybe reading native methods in JLS would clear things for me.
    Thanks.

  • What is Bitwise exclusive OR (XOR)    ^   ?

    I have a SCJP question that asks the value of 16/2^2
    Can someone tell me more about this operator?

    1 XOR 1 = 0
    0 XOR 1 = 1
    1 XOR 0 = 1
    0 XOR 0 = 0put your code in a program and get the out put and then interprit the results you will be able to understand what happens behind the code

  • JAVA Fresher-Should I join Sun Authorised learning Centre?

    Hello friends,
    I m a BCA Graduated in 2004 from India. I have 2 years of experience as Web Developer(PHP). Due to Family problems I could not go for regular MCA. Presently persuing MCA from ICFAI, Tripura first Semester. But I m not able to get any job in Big IT Giants like Infosys, TCS as these companies don't have requirements for PHP Developers and to join as a fresher I m not eligible to apply as I m 2004 passout and these companies demand atleast 2005 passout.
    Therefore I m thinking of migrating to JAVA. I don't know ABC of JAVA. There are a number of local institutes teaching JAVA for 10k-15K INR in Delhi/NCR region and providing fake experience certificate for 2 years in JAVA to me as I have 2 years of industry experience.
    I need help from all experienced people out there. Should I join a local institute or should I go for Sun authorised learning Centre?
    I know about one Authorised learning Centre, SQLStar International. They charge around 33000 INR for 256 hrs of training to be completed in 64 working days. They claim that their training prepares a person for SCJP and SCWCD exam cost of which is 7200 Per Exam.
    So total cost is 33000 + 7200 + 7200 = 47400 INR
    Please tell me if its a right decision to spend this much amount on training and certification?
    Does it make any difference while on a Job Hunt if you are trained from a Authorised learning Centre or a local centre?
    Will it be easy to get job after this training and certification?
    If someone want, I can mail him/her couse contents of SQLStar and a local Institute for comparison.
    Please guys I need honest advice.
    Thankyou all for your time and efforts.

    Hi, my name is Jeffry (Indonesia)
    Actually, if you can do self-study, you can do self learning with java book, after that, you can submit E-practice Exam for scjp, and then you take the exam
    If the employer has a choice, he or she will choose the job seeker with the SCJP certification.
    Sun microsystems created the Java technology, of course their training courses support for the material covered in any certification exam such as SCJA, SCJP, SCJD, SCMAD, etc.
    I already get certified in 27 August 2007, in my experience, I studied so many Java books, and then I took SL-275 training, E-practice exam, and the the SCJP exam. That's all that I can do to share my experience, the choice is yours. When you passed the exam, don't forget to share experience and score (if you want to share your score, my score is 68%)
    regards
    Jeffry Kristianto Yanuar
    E-mail : [email protected]

  • Unable to access protected function from the child object

    Hi all ,
    I have an abstract class having one protected method
    package foo;
    public abstract class A {
      protected String getName(){
                 return "ABC';
    package xyz;
    public class B extends A {
              public void print(){
                              *super.getName();//this will get called*
    package abc;
    public class Ex {
            public static void main(String [] args){
               B b = new B();
               *b.getName(); //Im not able to calll this function*
    }{code}
    My question is why I m not able to call the protected method from child instance but inside the class ???
    I have checked this link , it also didn't say about the instance access or access within class .
    [http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html]
    Thanks and regards
    Anshuman
    Edited by: techie_india on Aug 31, 2009 11:25 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    jossyvjose wrote:
    Hi Winston,
    Did you mean like this? But still same behaviour.
    package abc;
    public class Ex extends A {
    public static void main(String [] args){
    B b = new B();
    b.getName(); //still i am not able to calll this function
    }No. Class 'Ex' would have to extend B in order to call b.GetName(). And I would definitely not make Ex part of your hierarchy (it's the sort of thing you see in SCJP questions, but definitely a bad idea).
    What you can do though is to override the method; and Java allows you to change the visibility of overriden methods, provided they are more open. Thus, the following would be allowed:
    package foo;
    public abstract class A {
       protected String getName(){
          return "ABC';
    package xyz;
    public class B extends A {
       public void print(){
          System.out.println(super.getName()); // your previous code does nothing...
       public String getName() { // Note the "public" accessor
          return super.getName();
    package abc;
    public class Ex {
       public static void main(String [] args){
          B b = new B();
          b.getName(); // And NOW it'll work...
    {code}Note that this is just example code. I wouldn't suggest it as general practise.
    Also, when you write *public* methods, you should generally make them *final* as well (there are exceptions, but it's a good habit to get into; like making instance variables *private* - just do it).
    HIH
    Winston                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Doubt in reference variable casting

    10. interface Foo {}
    11. class Alpha implements Foo { }
    12. class Beta extends Alpha {}
    13. class Delta extends Beta {
    14. public static void main( String[] args) {
    15. Beta x = new Beta();
    16. // insert code here
    17. }
    18. }
    Which code, inserted at line 16, will cause a
    java.lang.ClassCastException?
    A. Alpha a = x;
    B. Foo f= (Delta)x;
    C. Foo f= (Alpha)x;
    D. Beta b = (Beta)(Alpha)x;
    Doubt:
    ClassCastExecption will come when we insert "B" option. My doubt is , how can we cast the beta object as "Alpha" and then "Beta" (Ref D option). Please explain in detail why the option D will not throw ClassCastExecption.

    MyBugs_Bug wrote:
    Doubt:
    ClassCastExecption will come when we insert "B" option. Hi, this looks like an SCJP question, eh.
    class Delta extends Beta {}
    Beta x = new Beta();
    Foo f = (Delta)x;This will cause CCE because "all Delta are Beta but Not all Beta are Delta", right? E.g all rectangles are shapes but shapes are Not necessary Rectangles. So, you cannot cast a rectangle into a shape.
    MyBugs_Bug wrote:
    My doubt is , how can we cast the beta object as "Alpha" and then "Beta" (Ref D option). Please explain in detail why the option D will not throw ClassCastExecption.
    class Beta extends Alpha {}
    class Delta extends Beta {}
    Beta x = new Beta();
    Beta b = (Beta)(Alpha)x;(Alpha)x will not throw CCE because all Beta are Alpha. Yes? So Beta b = (Beta)(Alpha)x is legal and is perfectly okay.
    P/s: If there are any errors in my reply, please correct me. Thank you.

  • Learning centre

    Just wondeing ifthe learning centre is still a/v
    tried to find it on the website with no luck
    it has been years since I used it
    bgvern

    Hi, my name is Jeffry (Indonesia)
    Actually, if you can do self-study, you can do self learning with java book, after that, you can submit E-practice Exam for scjp, and then you take the exam
    If the employer has a choice, he or she will choose the job seeker with the SCJP certification.
    Sun microsystems created the Java technology, of course their training courses support for the material covered in any certification exam such as SCJA, SCJP, SCJD, SCMAD, etc.
    I already get certified in 27 August 2007, in my experience, I studied so many Java books, and then I took SL-275 training, E-practice exam, and the the SCJP exam. That's all that I can do to share my experience, the choice is yours. When you passed the exam, don't forget to share experience and score (if you want to share your score, my score is 68%)
    regards
    Jeffry Kristianto Yanuar
    E-mail : [email protected]

  • String object...

    public class samp{
    public static void main(String args[]){
              String str1=str();
    System.out.println(str1);
         public static String str(){
    String s = "dgsg";
    s+="etre";
    s=s.substring(1,3);
    s = s.toUpperCase();
    System.out.println(s);
    return(s.toString());
    I just ant to know how many objects are created.... And Explanations...

    Muthukris wrote:
    This is SCJP Question.... The answer given is 3...Buit according to my idea it will be 5... Because sting is immutable... So for each and every modification it will create object..I am not sure if my methodology is correct, but I think it is and will give you the answer:
        int i = 1;
        String s = "dgsg";
        if ( s != s + "etre" ) i++;
        s+="etre";
        if ( s != s.substring(1,3)) i++;
        s=s.substring(1,3);
        if ( s != s.toUpperCase()) i++;
        s = s.toUpperCase();
        if ( s != s.toString()) i++;
        System.out.println(i);Did not know what to do about the System.out.println(s), but I believe no new string is created in there.

  • Is the SCJA certification required before you can be SCJP certified?

    Hello,
    my question is, do I have to be SCJA certified before taking the SCJP test?
    And if it is not required, do you suggest that I take SCJA anyway? It seems to me that if you're SCJP certified, then chances are you probably already know the Associate stuff.
    Thanks!

    You don't need to do SCJP before SCJA
    One thing I've seen is people doing SCJP on 1.4, which is an easier exam than 1.5, with a lower passing score (52%).
    Then, you get your SCJA on Java 1.5, which is the only version it is currently out on. Then you can brag about being certified by Sun on both Java 1.4 and Java 1.5. It looks great on a resume, especially if you're looking for a Java job.
    As far as SCJA mock exams go, or even some free tutorials on how to get Sun Java Certified, check out the following links:
    http://studyguides.scja.com/ExamScam/sunjavacertifiedtutorialsandmockexams.jsp?link=mockexams
    http://studyguides.scja.com/jsr168/ibmportalcertexam399.jsp?link=mockportalexamsmockscjaexams
    Enjoy!
    -Cameron McKenzie
    http://www.scja.com
    http://ww.portorials.com
    http://www.scwcd.com

Maybe you are looking for