• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

SCJP 1.4 Answer Options Format - Like Dan or Marcus ?

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This question is intended for people who have taken the SCJP 1.4 Exam.
The answer options that are provided in the actual Sun Exam are in which format like Dan's or Marcus'?
Marcus tends to give a reason alongwith the option. Dan just states the option without stating any specific reason.
E.g. Marcus' Option Format:


public class MyMain {
public static void main(String argv) {
System.out.println("Hello cruel world");
}
}

1) The compiler will complain that main is a reserved word and cannot be used for a class
2) The code will compile and when run will print out "Hello cruel world"
3) The code will compile but will complain at run time that no constructor is defined
4) The code will compile but will complain at run time that main is not correctly defined



E.g. Dan's Option Format:


class A {
A() throws Exception {} // 1
}
class B extends A {
B() throws Exception {} // 2
}
class C extends A {
C() {} // 3
}

Which of the following statements are true?
a. class A extends Object.
b. Compiler error at 1.
c. Compiler error at 2.
d. Compiler error at 3.
e. None of the Above



Thanks in Advance
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good point. Any one?
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
a mix of the two from what I remember... the format of the exam itself is very similar to Bill Brogden's Exam Simulation Applet
(You can find this and other mock exams here in the JavaRanch's Mock Exam list.)
 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A reasonable expectation would be some of both.
The question styles will also vary - from short
and sweet, to a more scenario driven question.
Dave Brafford
-------------
Considering the Certified Java Programmer Exam?
Get JCertify!
http://www.enterprisedeveloper.com/jcertify
For exams 310-025 and 310-035
 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, in the main exam itz a mixture of both types. So it is better to prepare like the Dan's type questions.
If you can do it for Dan's questions than , the first ones(Marcus's one) will be easier for you !!
 
author
Posts: 9050
21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vijay -
When you are given a code listing the questions will almost all look like this:
Given:

What is the result?
A) Hello cruel world
B) no output is produced
C) Compilation fails at line 2
D) Compilation fails at line 3
E) An exception is thrown at runtime
A few things to note:
The answers will almost always be sorted from shortest to longest.
If the code line numbers don't start from '1', it is assumed you are looking in the middle of a source file.
It is rare that the exam will ask you why the compiler failed. (More frequently the exam will ask you where compilation failed).
The infamous 'What is the result?' is kind of a catch-all question, it allows for sucessful output, or compiler errors, or runtime exceptions, to all be gramatically acceptable answers.

-Bert
 
Vijay Albuquerque
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks to all for the wonderful feedback
 
He repaced his skull with glass. So you can see his brain. Kinda like this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic