Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cleared SCJP Paper

 
John Maruscak
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public class ClearedExam {
static int test = 61;
public static void main (String []letsparty){
System.out.print("cleared exam with" + test);
}
}
// Thank God its over...
// John Maruscak
// SCJP, MCSD, MCSE, MCT
 
Peter Tran
Bartender
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John,
To nitpick on your amusing little program.
1. "static int test" should be "final private static int test", since you can't change your score and you really don't want any other class outside this one to know your score either (The certificate won't have your score, so why should you make your score accessible outside this class?)
2. "public static void main (" should really be "public static void main(" If you add the extra space between main and the open paren '(', JCertify will mark it wrong. I'm not sure about the real exam, but it's better to be safe than sorry.
3. System.out.print("clear exam with" + test); should be System.out.println("clear exam with " + test); - you want to move on to bigger and better things, so using println will move you to the next line. And you really need a space after "with " to make your output more readable.


Ignore everything I just said, and congratulations on your success!
-Peter
 
John Maruscak
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, lighten up a little. Maybe its not perfect form, but it wasn't ment to be.
//*"For amusment purpose only"
 
Shrini Kulkarni
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peter and John !!
Good post (I mean question) John and good answer Peter !! we need to be slightly relaxing and inovative in thinking and coding.... I would like to see more and more such posts and replies. This will really ease the tensions of those who are heading to testing centers.
kudos to both of you
Shrinivas
[This message has been edited by Shrini Kulkarni (edited February 16, 2001).]
[This message has been edited by Shrini Kulkarni (edited February 16, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic