Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Lalaka Jeerasinghe

Greenhorn
+ Follow
since Jun 04, 2010
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 Lalaka Jeerasinghe

I think it's worth waiting!!!
The beta exam results should be out soon so the new exams would be out within the first quarter or so this year.
Congratulations!!!
11 years ago
Congatulations Janeice!!
11 years ago

Congrats Lalaka
This is a very inspiring achievement. Keep up the great work!



Great Score! Congratulations!



Thats really great and inspiring.

Happy to see the results of your hard work and efforts!

Cool dude.. Congrulations



Well done, congratulations!



Thank you!!




Congratulations Lalaka.
Nice to hear such achievement from Sri Lanka, and glad knowing that ExamLab helped.



Thanks!! Thnanks for providing such a great learning tool free!
11 years ago

I suspect it takes a few days for the data to be updated, so if I were you I'd go and have a beer and relax for a couple of days then go and check it

I just checked mine and it took 2 days for the result to be available in cert manager so your candidate id probably doesn't exist until it has been added by the people at Oracle.



I got the email from sucert_ww@oracle.com today and activated the account.
Thanks for your advice.. (advice - beer )

Anyway they say that the certificate would be delivered within 30 days!!! Are you sure that it would be so quick! I thought it would take about three months in another topic posted here in this forum.https://coderanch.com/t/516479/java-programmer-SCJP/certification/Didn-receive-certificate

How do we know the day they posted the certificate

Do they email us when they send us the certificate!!
11 years ago

will myers wrote:silly question but have you gone through the registration process at CertManager? Click on the first time users link and follow the instructions



Yes!
But it gives the following error message!!
“We could not find a user meeting the specified criteria. Please review the criteria and try again.”

11 years ago
I cleared the OCP JP Exam today but i cannot access certview neither certmanager!!
11 years ago

Abimaran Kugathasan wrote:Congrats!



Thanks!!
11 years ago

Anish Kurian Thomas wrote:Wow great score.... Congrats.... Keep it up



Thanks!!
11 years ago


Hi I am right home after the exam..

I wanted to tell you guys that I cleared the OCJP exam with 100%.

First of all I would like to thank Mr. Devaka Cooray for his excellent Exam Lab software.
All the guys at javachamp.com
And Kathy Sierra & Bert Bates for their excellent work on the Exam... Sorry I didn't buy a copy but i borrowed one from my friends!!!

Let me tell you'll how I prepared for the exam!!
I started learning java at the UCSC (University of Colombo School of Computing - Sri Lanka) on late February 2010. Since then i was writing lots and lots of code in java. I knew C# C++ C as well, sometimes it was confusing to sort out issues between all the languages, it provided some necessary back ground for me!!!
Then I got down Kathy Sierra Book from one of my friends and went through the whole book within one week!!
Then I did some mock papers to check my level (my initial plan was to take the exam somewhere in July 2010 ).
The first mock exam I did was ExamLab's diagnostic exam!! Believe me I scored only 17%
I was shocked!!

Then i changed my traditional approach to the exam(studying books and writing codings for countless hours )
I use ExamLabs as a learning tool. The explanation were good. I had K&B book open on the table, turning pages here and there between those "Two Minute Drills".
Then i used many mock exams available on the net _> javachamp.com was one hot place........
Finally I was able to score 52% percent at ExamLabs Simulator.(Not that impressive. Eh )

Then i turned to the CD which came with the K&B book. Learnkey exams. I scored 68%, 72% and 66% for the exams provided in the CD. (There hints and the report they were generating after the exam was very very very helpful..)

Finally after lots of hardworking and doing the practice exam 1 in OCP Java SE6 Practice Exams Chapter 1 which is freely available at mhprofessional.com, completing the mock test at "A Programmers Guide to Java SCJP certification Mughal Rasmussen", when i was able to complete all the self tests provided at KB. I decided to take the exam.
11 years ago
Thanks Prithiv!!

The link i followed was really helpful
Thanks for pointing it out.

https://coderanch.com/t/454384/java/java/compile-time-constant

Hareendra Reddy wrote:Hello Lalaka Jeerasinghe ,

Thank you for the post, it is very informative..

But i am still unable to convince, why the code doesnot compile even if final variable b is initialized
before it is used in switch .

Anyway if we are using a method variable which is uninitialized the compiler error appears,
but the error here is different...

Can you please elaborate this statement "Simple names that refer to final variables whose initializers are constant expressions "



final variables can be declared as a local variable,
For an example the following compiles and prints out the value of a as 10.



but if you try to do this........


You get a compile time error:-> variable not initialized...

Final Variables
Declaring a variable with the final keyword makes it impossible to reinitialize that variable once it has been initialized with an explicit value (notice we said explicit rather than default). For primitives, this means that once the variable is assigned a value, the value can't be altered. For example, if you assign 10 to the int variable x, then x is going to stay 10, forever.


K&B BOOK PG 57.

So does this mean that without initialization, the final variable in the above source gets the value 0 assigned automatically, since its the default for primitves(here int), and receives the ability to modify it later



prints out a's value as 10.


But this

Is this valid.... Compile error is there.
If the value 10 was assigned in the first coding sample. why does the switch statement requires to initialize the variable at the same time??

Compile error :- TestKB.java:9: constant expression required
case b:
^

Final Variables
Declaring a variable with the final keyword makes it impossible to reinitialize that variable once it has been initialized with an explicit value (notice we said explicit rather than default). For primitives, this means that once the variable is assigned a value, the value can't be altered. For example, if you assign 10 to the int variable x, then x is going to stay 10, forever.


K&B BOOK PG 57.

So does this mean that without initialization, the final variable in the above source gets the value 0 assigned automatically, since its the default for primitves(here int), and receives the ability to modify it later

A compile-time constant expression is an expression denoting a value of primitive type or a String that is composed using only the following:

Literals of primitive type and literals of type String
Casts to primitive types and casts to type String
The unary operators +, -, ~, and ! (but not ++ or --)
The multiplicative operators *, /, and %
The additive operators + and -
The shift operators <<, >>, and >>>
The relational operators <, <=, >, and >= (but not instanceof)
The equality operators == and !=
The bitwise and logical operators &, ^, and |
The conditional-and operator && and the conditional-or operator ||
The ternary conditional operator ? :
Simple names that refer to final variables whose initializers are constant expressions
Qualified names of the form TypeName . Identifier that refer to final variables whose initializers are constant expressions


JLS 2nd Edition


http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6350757bug in java but solved!