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

cannot believe it! 98%!!!

 
bill williams
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i missed one in threads
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow bill, that's a great score.
Good job!

Rob
 
bill williams
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sonir,
Here is my suggestion to you:
I had 6 questions on threads. so at least remember api of Thread and Runnable.
collection: list, set, map, vector, arraylist, their constructors/methods and characteristics
IO: constructors for InputStream, FileInputStream etc.
some of questions are closely related. dont be surprised that you find two questions are almost the same, and on the same concepts.
 
bill williams
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Rob.
I was expecting only 80%, even after I clicked the end button. well. it feels good- i shd have not walked out half hour earlier.
 
sonir shah
Ranch Hand
Posts: 435
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bill..
You Are Genious!!!
That is indeed an EXCELLENT SCORE......
Keep it up buddy...
Thanx for the tips..What else do u have to say anything for me??...
Which tpoics do u think should I lay more emphasis other than I/O and Threads.Were they similar kind of from JQ+..??
Hey what about AWT.What were the questions like?..Did it ask something like which one is the default layout for frame, panel...etc..
Please let me know..
Congrats again..
So where's the treat?..
Sonir
 
sonir shah
Ranch Hand
Posts: 435
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Bill.
This is my last day to study for SCJP Test.
As Shivaji told, I have already made my cheat sheet.
I'll tell you what have I written in that.I wrote all the Constructors and its Methods of File, RAF,Streams and Writers,String and StringBuffer class const+Methods,Collections,Threads const+static methods of threads. Math methods and methods of Object class.
What do u think about this..Is this much Ok for the last one hour revision?..let me know if I need to add anything more?
Do I need to add anything about AWT?..If yes then let me know like what?..
Neways just reply as soon as possible since I have just 24 hours in my hand.
Congrats again by the way
Sonir
 
bill williams
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got one question about the default layout of frame, something like adding some textfields and buttons on it without constraints.
I think you need to remember classes in java.util. eg., which collections are unique/not unique, synchronized.
in IO, I also got some questions on encoding, FileOutputStream(String/File,boolean append/default);
I think about 10 questions are directly from JQ+, about 5 of them are exactly the same. I guess either JQ+ people copied them from Sun database, or Sun people also ordered JQ+
Oh almost forget, one question is about converting an int literal to a byte/short, which does not need to cast, but you need to cast if the int is a variable. i learned this concept here just 2 days ago- thanks ranchers.
overall I feel it is easier than JQ+ exams. actually I never got >90% in all these mock exams in the first time.
 
bill williams
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how about gridbaglayout parameters like gridx, weightx, fill anchor etc?
most of all, sleep well and think clear during the test. good luck
 
sonir shah
Ranch Hand
Posts: 435
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bill
Thanx.
I just want to clear some doubts.
You said that in java.awt we need to rememeber the collections which are synchronised or something, I still don't get you.Could you throw some light on this part?.
Also one more thing,I just want to clear that
we ofcourse need a cast right when converting an int value to to a byte/short? dont we?
If possible could you just let me know in detail?.
I am a bit confused?..
OK let me know any other important point which you think is important, and should be remembered.
Hey, by the way, are you satisfied with my cheat sheet work, any more additions?..just let me know.
Thanks.
Sonir
 
Bhushan Jawle
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congrats Bill, great score !
 
bill williams
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bhushan, thanks
sonir, i meant classes in java.util package.
about the cast, read a previous thread, basically,
final static int i=5;
byte b = i; //legal
short s = i; //legal
byte b1 = 3; legal
short s1 = 5; //legal
but
int k=5;
byte b2 = k; //illegal, shd be byte b2 = (cast) k;
short s2 = k; //illegal, shd be short s2 = (cast) k;

the reason is that, in the first senarios, they are bind during compiling time, compiler implicitly cast int to byte and short, but if the int is larger than their range, then compiler will complain. try to run then, you will see. see this link and my example there. http://www.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=24&t=014434
 
mark stone
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>need a cast when converting an int value
>to to a byte/short?
yes. but if int is literal and within range you don't need the cast.
int x=10;
byte b = (byte)x; //CAST NEEDED
final int x =10;
byte b = x; //NO CAST HERE

Originally posted by sonir shah:
Hi Bill
Thanx.
I just want to clear some doubts.
You said that in java.awt we need to rememeber the collections which are synchronised or something, I still don't get you.Could you throw some light on this part?.
Also one more thing,I just want to clear that
we ofcourse need a cast right when converting an int value to to a byte/short? dont we?

Thanks.
Sonir
 
sonir shah
Ranch Hand
Posts: 435
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Bill and Mark.
I just want to clear that:
if the int is final or static, then we dont need a cast.or else we need..
Am i right?..Just let me know incase..
Am still not clear about this matter.
If possible give me an example of both the cases..
Thanks in advance
Sonir
 
mark stone
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
int x=10;
byte b = (byte)x; //CAST NEEDED
final int x =10; (x should be less than 127)
byte b = x; //NO CAST HERE

static just means that it belongs to the class. it is the keyword "final" that makes the variable "x" become a constant. so please remove any doubts about static. ofcourse you could add static keyword but the real one is final keyword that makes x constant.

Originally posted by sonir shah:
Hey Bill and Mark.
I just want to clear that:
if the int is final or static, then we dont need a cast.or else we need..
Am i right?..Just let me know incase..
Am still not clear about this matter.
If possible give me an example of both the cases..
Thanks in advance
Sonir
 
bill williams
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no, no cast is needed only if the int is "static final"(static AND final), and literal ints. try to run the example i provided in the link above and change their decalartions, see what happened.
 
mark stone
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bill:
i just ran this code inside the main() method and it works. if final keyword is removed it gives compile error.
final int x =10;byte b = x;System.out.println("b is "+b);
Originally posted by bill williams:
no, no cast is needed only if the int is "static final"(static AND final), and literal ints. try to run the example i provided in the link above and change their decalartions, see what happened.
 
sonir shah
Ranch Hand
Posts: 435
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark and Bill again..
For Bill: I read the link which u mention in your previous post.
But still, the rachers were unable to sove the matter clearly because all went with different views.please let me know the exact thing, since I dont have much time....
First :
final int x=10;
final char y=10;
final short z=10;
int m=10;
char n=10;
short o=10;
Ok my questions :
I guess these will compile fine,..Just let me know whether I am right or wrong
byte b;
b=x;
b=y;
b=z; All these will compile fine since x, y and z are final modifiers and are compile time constants..
Also,
b=10--> willcompile fine..
But,
incase if we remove the final modifier., it wont compile for x, y and z..
Please let me know whether I am right?......
Can some one let me know the exact stuff in this matter..which one will compile and which one will not(If possible give examples)
Javagurus, bartenders, sheriffs..etc..where are you buddies??....Need your comments..
Let me know as soon as possible....
Sonir
 
bill williams
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

For Bill: I read the link which u mention in your previous post.
But still, the rachers were unable to sove the matter clearly because all went with different views.please let me know the exact thing, since I dont have much time....
First :
final int x=10;
final char y=10;
final short z=10;
int m=10;
char n=10;
short o=10;
Ok my questions :
I guess these will compile fine,..Just let me know whether I am right or wrong

yes

byte b;
b=x;
b=y;
b=z; All these will compile fine since x, y and z are final modifiers and are compile time constants..

NO, x, y, and z have to be "final static", which means they are both final AND static! i say again here, THEY HAVE TO BE "FINAL STATIC", NOT FINAL ONLY

Also,
b=10--> willcompile fine..

yes, literal is fine

But,
incase if we remove the final modifier., it wont compile for x, y and z..
Please let me know whether I am right?......

see my comments above.

Can some one let me know the exact stuff in this matter..which one will compile and which one will not(If possible give examples)
Javagurus, bartenders, sheriffs..etc..where are you buddies??....Need your comments..
Let me know as soon as possible....

its saturday night, everyone is partying!
 
sonir shah
Ranch Hand
Posts: 435
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx Bill..
Oops!! I forgot because coz I am from India and right now its Sunday Afternoon..
Sonir :
 
Rick Reumann
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you insisting that the variable has to be declared final AND static. The code below seems to work fine.
 
Rex Rodriguez
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bill,
Congrats. What was your base book while preparing for the exam RHE or Khalid's book?
 
bill williams
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rick, yes you are right. i guess i made a mistake somewhere. sonir, i think i was wrong. sorry.
Rex, unlike some others, I have some real world programming experience. this time i only read Brodgen's Exam Cram, and did some free mock exams and 2/3 of JQ+ questions.
 
Rashid Ali
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congrats bill for the big score!
What's next...
Rashid Ali
 
bill williams
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i really dont know. I have experience with J2EE (EJB/JSP/Servlet/XML) technologies and familar with some application servers. I am wondering whether i shd go for Web component certificate or an Oracle certificate, like OCA, eventually Oracle DBA, or a WebLogic certificate?. I heard that sun's Web component certificate is relatively easy to pass, but i guess a WebLogic or Oracle certificate may be more valuable? any suggestion/comments?
 
Ghulam Rashid
Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulation, thats a great score.
Rashid
 
Ashik Uzzaman
Ranch Hand
Posts: 2373
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
congrats! score!!
 
chung lee
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, you've caned it big time
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good job bill
 
Nikki Nguyen
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Bill,
Wow, congratulation on your exam.
Would you please to explain for me what stand for
JQ+?
Many Thanks,
Nikki
 
bill williams
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for all congrats
Nikki, JQ+ is a mock exam from http://www.enthuware.com/jqplus/
It is widely considered to be a little harder than the real test. I think it is worth 20 bucks. (Disclaimer: I dont have any relation with them, except that i bought the exam a month ago. I think they should pay me for promoting it, at least refund my 20 bucks )
 
Nikki Nguyen
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Bill,
Thank you very much.
Nikki
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic