Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!

Dharmenrda kumar

Greenhorn
+ Follow
since May 13, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dharmenrda kumar

Donald Gatan wrote:CONGRATULATIONS!!!
May I know what specific book did you use? Is it the K&B Mc Graw Hill - SCJP Sun Certified Programmer for Java 6 Exam 310-065 (2008) or the First Head Java 2nd edition? Thank you.


thanks Donald...
Actually i have used K&B books,but if you do not have any basic knowledge of java then it could be better to start with Head First java books and then switch over K&B books and read it two or three times.
7 years ago
hi walters
SCJP Sun Certified Programmer for Java 6 Exam 310-065 is the updated version of book. and this single book is sufficient to get a good score in exam so first complete this book then go for several mock test.

Joe Harry wrote:Congrats!


Thanks Harry
7 years ago

Paul Anilprem wrote:Congratulations!!


Thank you Paul.
7 years ago
hi friends...
finally after 3 months preparation, i took the exam today and i got 96% .
Its all credit goes to K&B books and its author Kathy Sierra & Bert Bates,because without this book it was not easy for me to even decide from where should i start preparation.definitely, its a wonder full books that is fully focused on Exam.Thank you Kathy & Bert.(i had surprised when first time i read your book,wow!!! how you guys have explain in a simple & funny way )
if i say honestly K&Bbook is sufficient to not only pass but to get a good score.
Exam much easier then even K&B practice Test which is at end of each chapter except few tricky question.
i have used several mock test like Exam Lab,WhizLabs,Enthuware and my average score was never more than 70%.
in Exam Lab my score was:-
Practice Exam-1:58%
Practice Exam-2:72%
Practice Exam-3:76%
Final Exam-62%(Fail).
In MasterExam my Average score was around 70% and
i never got more than 70% in any practice test of OCP practice Exam
but one thing i advice to all who are preparing for OCJP6 is do mock Exam as much as possible,because during the Mock test you will learn so many things that will help you during final Exam.
finally i thanks to Ankit Garg(who inspired me during begining of preparation, when i was getting less then 60% marks in mock exam),
Ikpefua Jacob-Obinyan(who gave me a wonderful idea to solve garbage collection related problems,however today 2 question that i missed one of was GC related haha ha but any way his Idea was really nice )Ash Gill,and my Roomy Harendra Readdy for his last time tips and all JavaRanchers for there Immediate reply.

* sorry if there any mistakes because English is not my First language.

7 years ago
Congratulation Ash
and Keep it up...
7 years ago

Seetharaman Venkatasamy wrote:serialize and deserialize should be in different class.
note: please search first. this kind of topics discussed many times here in javaranch


sorry i did't got what you want to say...
but the complete code is like...


import java.io.*;
public class A{
public static void main(String arg[]){
B b=new B();
b.x1=7;b.x2=7;b.x3=7;//1
try{
FileOutputStream fs=new FileOutputStream("a.txt");
ObjectOutputStream os=new ObjectOutputStream(fs);
os.writeObject(b);
os.close();
}
catch(Exception e){}
try{
FileInputStream fi=new FileInputStream("a.txt");
ObjectInputStream oi=new ObjectInputStream(fi);
b=(B)oi.readObject();
}
catch(Exception e){}
System.out.println(b.x1+""+b.x2+""+b.x3);
}
}

class B implements Serializable{
static int x1=0;
volatile int x2=0;
transient int x3=0;
}
after running the output is x1=7,x2=7,x3=0
hi
today i got sample question(for ocjp6) and there was a question regarding Serialization and deserialization...
import java.io.*;
public class A{
public static void main(String arg[]){
B b=new B();
b.x1=7;b.x2=7;b.x3=7;//1
//Serialize b and then deserialize b
System.out.println("x1="+b.x1+"x2="+b.x2+"x3="+b.x3);
}
}

class B implements Serializable{
static int x1=0;
volatile int x2=0;
transient int x3=0;
}
i answered x1=7,x2=7,x3=0
but solution says it should be x1=0,x2=7,x3=0
i am not be able to understand that why x1 is not equal to 7 because at 1, x1 has explicitly initialized with 7.
even i write the complete code then after running still i got x1=7,x2=7,x3=0

Ash Gill wrote:i will suggest drop them an e-mail or call them. but i tried that free exam, it was too easy. you can find loads of such questions online, try certpal.com .. it offers free mock tests in an online exam simulation environment.


Thanks Ash,
Today i got the sample question and after taking the exam i scored 88%

hi Ash,
how can i wait for one week because i have to give the exam this coming Monday(1st August) which is less than one week.
so it means i will not get any Question?
hi,
today i have registered for OCJP6(1Z0-851) but i didn't got any Sample question from Oracle.
earlier i have read in this forum (that somebody has posted) that Oracle is providing Some sample Question after registration.
is it true that Oracle gives Sample Question after registration ?
please tell me if any body know about it.
congrates Bro...
next week i have to also give the exam so will you please tell me what mock test you have given during preparation?
is there any Drag & Drop type question?
7 years ago

Bert Bates wrote:It could be that the question has been recreated well enough for the purpose of this conversation, but it's not quite verbatim. So, if a lot of further discussion is generated, it should start with a verbatim recreation of the original question

Bert


first of all, thank you sir for such a valuable suggestion,
it's right it is not the exact question,but i had problems with number of objects created ,thats why i had posted a part of that question.

Thorsten Schneider wrote:Anytime you create an object of type Dozens, it has an int array called dz as a member variable. So line 6 is the first object of type Dozens[], line 7 are the next 2 objects created (one of type Dozens and one of type int[] associated with it), as well as line 8 where another Dozens object with it's associated int[] is created. That's a total of 5 objects.



Thank you so much Thorsten