jQuery in Action, 2nd edition*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes My SCJP Preparation Notes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "My SCJP Preparation Notes" Watch "My SCJP Preparation Notes" New topic
Author

My SCJP Preparation Notes

Jamal Hasanov
Ranch Hand

Joined: Jan 08, 2002
Posts: 411
Hi, ranchers
You can find my SCJP preparation notes here
Jamal's Preparation Notes
Jamal
SCJP
Val Pecaoco
Ranch Hand

Joined: Dec 05, 2001
Posts: 156
Hi Jamal,
Cool page
How about chess? I couldn't seem to hold off my chess whenever I'm hacking Java. Do you stop by KasparovChess.com Playing Zone once in a while? OK, my handle is "pecaocov". Maybe we could play a game or two.
And hey man, congrats. After you, man!
Ex Animo Java!
-- Val


"Knowledge is power, but enthusiasm is the key." -- Lavern Barn
Jamal Hasanov
Ranch Hand

Joined: Jan 08, 2002
Posts: 411
Sorry Val, but I didn't understand you. (I mean chess) ???
Anyway, thanx for reply.
Neelima Rao
Greenhorn

Joined: Feb 24, 2002
Posts: 26
Hi Jamal,
Congratulations...Your notes is excellent.......
In Overriding section:
3rd point says,
The throws clause of the overriding method must <B>only</B> specify exceptions that are in the throws clause of the overridden method

But an overriding method can also throw exceptions that are subclasses of the exception which is thrown in the overridden method.
In Collections, did you get any questions regarding methods in Collection interfaces?
TIA....
Jamal Hasanov
Ranch Hand

Joined: Jan 08, 2002
Posts: 411
No Neelima,
You needn't learn all methods of LinkedList,Collection,HashMap or etc.
Exam will ask you concrete things!
You had to learn 3 things :
1-Learn hierarchy (you may get questions like this:"What is the parent of HashMap interface?"
(P.S.THIS IS NOT A QUESTION FROM REAL EXAM!)
2-Remember that:
TreeMap & TreeSet has comparator() methods
Vector&Hashtable are only synchronized collections.
3-Of course,about unique,nonunique,sorted,etc. behaviours.
That's ALL!!! Nothing else !!
LEARN THE COLLECTIONs HIERARCHY !!!
P.S. When I started exam,I drawed this tree in paper and began answer questions quickly.
By The way,
Unlike other BIG notes,my notes hold necessary information ( not every word from books:-) ). I gonna update my notes to improve the quality. That's why I suggest not to download my notes,because periodically I'll update my notes.
Whishing all the best in your study
With best regards,
Jamal Hasanov
SCJP2
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Jamal:
I have a question about Math.round(). In your note round(x)=truncate(x+0.5). I do not think that is correct. According to API, round(x)=floor(x+0.5). That's why round(-2.6)=-3.
Yao
Jamal Hasanov
Ranch Hand

Joined: Jan 08, 2002
Posts: 411
Dear Yao,
You are right. I knew that but forgot to correct.
BTW,there is no truncate() function in Java.
Thanx a lot Yao,
I ask everyone to check errors like this and inform me.
Jamal
Matthew Haynes
Greenhorn

Joined: Feb 04, 2002
Posts: 6
If you did want to truncate in Java, just cast a floating point number to an integral. Eg: the following code will set i to 20


Regards,
Matt
Jamal Hasanov
Ranch Hand

Joined: Jan 08, 2002
Posts: 411
Matthew,
I know that truncate is possible. ( I wrote that there is no truncate() function. I meant function (not functionality) inside Math class)
Thanx for reply,
Jamal
WiLL Tao
Ranch Hand

Joined: Dec 14, 2001
Posts: 56
Originally posted by Jamal Hasanov:
Hi, ranchers
You can find my SCJP preparation notes here
Jamal's Preparation Notes
Jamal
SCJP


neat notes.
grab for learning


Thank Folks who <b>Make Sense</b> here.<br />SCJP Platform 2
Jamal Hasanov
Ranch Hand

Joined: Jan 08, 2002
Posts: 411
Thanx a lot, WiLL
I'm gonna to update this notes every week. I've added necessary tips to my notes(that's why it's just 8 pages). No additional unneeded info!
I'll add some tips about overriding and inheritance tips next week.
Thanx a lot.
Jamal
Ivan Ivanoff
Ranch Hand

Joined: Jan 04, 2002
Posts: 56
great notes Jamal ! A+
Tina Ang
Ranch Hand

Joined: Mar 12, 2002
Posts: 58
Hi Jamal! File Input/Output Streams you've written that:
"If the file does not exist, it is created. If it exists, its contents are reset, unless the appropriate constructor is used to indicate that output should be appended to the file. A SecurityException is thrown if the file does not have write access or it cannot be created.
but how come the following code does not create the Hello.txt file? the output of the code is:
No such file found
Doing finally
-1

From Valiveru's Exam Applet
import java.io.*;
public class MyClass3 {
public static void main(String[] args){
MyClass3 mc=new MyClass3();
System.out.println(mc.myMethod());
}
public int myMethod() {
try {
FileInputStream dis=new FileInputStream("Hello.txt");

}catch (FileNotFoundException fne) {
System.out.println("No such file found");
return -1;
}catch(IOException ioe) {
} finally{
System.out.println("Doing finally");
}

return 0;
}
}

I confused...Need your help


Tina
Neelima Rao
Greenhorn

Joined: Feb 24, 2002
Posts: 26
Tina,
This statement is true only for FileOutputStream.
(Not for FileInputStream)
"If the file does not exist, it is created. If it exists, its contents are reset, unless the appropriate constructor is used to indicate that output should be appended to the file. A SecurityException is thrown if the file does not have write access or it cannot be created.

FileInputStream does not create a new file. If the specified file does not exist, it'll throw a FileNotFoundException.
HTH.....
Tina Ang
Ranch Hand

Joined: Mar 12, 2002
Posts: 58
got it! Thanks!!!
Tina
Jamal Hasanov
Ranch Hand

Joined: Jan 08, 2002
Posts: 411
Yes Tina,
I meant FileOutputStream. (I'll update this in 1.4 version).
BTW, ranchers, what do you think about my notes? What should I add ?
Thanx a lot for your attention and reply.
Jamal.
SCJP
Neelima Rao
Greenhorn

Joined: Feb 24, 2002
Posts: 26
In java.awt:
First line says:

TextArea and TextField classes has setColumns(int) and setRows(int) methods !!!

I dont think TextField has setRows(int) method. Only TextArea does.
Jamal Hasanov
Ranch Hand

Joined: Jan 08, 2002
Posts: 411
Neelima,
I'll correct this.
Thanx,
Jamal
Xu Jing
Greenhorn

Joined: Apr 15, 2002
Posts: 5
If superclass constructor throws an exception, then subclass constructor (which calls superclass constructor) MUST throw (or declare try/catch) this exception (or subclasses of this exception).

But look at the code below:
Super {
public Super() throws IOException{
}
}

/*** will give error ****
public Super() throws InterruptedIOException {
}
*******************/
}

So which is correct? can the subclass constructor throws subclasses of superclass exception only?
Jamal Hasanov
Ranch Hand

Joined: Jan 08, 2002
Posts: 411
Xu, it's just a typo.
I'll correct this.
=====================================
Super {
public Super() throws IOException{
}
}
public Subclass extends Super{
public Subclass() throws IOException {
}
/*** will give error ****
public Subclass() {
}
*******************/
// no constructor(default) will also give error
}
=======================================
Thanks a lot.
Jamal.
Toby Davis
Ranch Hand

Joined: Apr 09, 2002
Posts: 65
Studying Collections, and have a small question... on your diagram tree, did you mean ArrayList instead of "Array" falling under (implementing) List? I'm hoping you didn't mean the Arrays class!
(basing this off 1.4 API)
Originally posted by Jamal Hasanov:
No Neelima,
You needn't learn all methods of LinkedList,Collection,HashMap or etc.
Exam will ask you concrete things!
You had to learn 3 things :
1-Learn hierarchy (you may get questions like this:"What is the parent of HashMap interface?"
(P.S.THIS IS NOT A QUESTION FROM REAL EXAM!)
2-Remember that:
TreeMap & TreeSet has comparator() methods
Vector&Hashtable are only synchronized collections.
3-Of course,about unique,nonunique,sorted,etc. behaviours.
That's ALL!!! Nothing else !!
LEARN THE COLLECTIONs HIERARCHY !!!
P.S. When I started exam,I drawed this tree in paper and began answer questions quickly.
By The way,
Unlike other BIG notes,my notes hold necessary information ( not every word from books:-) ). I gonna update my notes to improve the quality. That's why I suggest not to download my notes,because periodically I'll update my notes.
Whishing all the best in your study
With best regards,
Jamal Hasanov
SCJP2


SCJP2 (1.4)
Jamal Hasanov
Ranch Hand

Joined: Jan 08, 2002
Posts: 411
Yes Toby,
You are right. This is a typo: there must me ArrayList instead of Array. I've corrected this.
Thanx a lot for correction.
Jamal
calrole huang
Greenhorn

Joined: Mar 29, 2002
Posts: 3
Hi,Jamal
I am a little disappointed that I can't open the page.
You do help me,don't you
thanx so much.
Jamal Hasanov
Ranch Hand

Joined: Jan 08, 2002
Posts: 411
Calrole,
I think there were problems in yahoo server. Try again.
http://www.geocities.com/itjamal/SCJPENotes.html
If some problems, contact me.
Jamal Hasanov
jamaladdin@yahoo.com
calrole huang
Greenhorn

Joined: Mar 29, 2002
Posts: 3
Jamal:
I really need your help now.
Are there other ways to get it?
Or could you send it to me at calrole@hotmail.com
Jamal Hasanov
Ranch Hand

Joined: Jan 08, 2002
Posts: 411
Calrole, no problem-I'll send it you in .DOC format.
With best regards,
Jamal. :-)
 
 
subject: My SCJP Preparation Notes
 
Similar Threads
SCJP and SCBCD notes on PPT
fail my SCJP ...
website for SCJP aspirants
Passed SCJP 6 with 91%!
I wanna pass SCJP with 100%