Thursday, February 7, 2013

Tools: Process Explorer

Process Explorer is an excellent Microsoft tool that allows to check process dependencies, which DLL processes have been opened or loaded, watch the CPU consumption or just track leaks. Process Explorer provides insights about applications... check it out!




Wednesday, February 6, 2013

SCJP 6 doubts: implicit imports

There are implicit imports that do not need to be declared.
The classes in java.lang package can be used without importing any package, this is an implicit import, so don't be fooled if you see a question that looks like that the import is missing.

What classes can we see in the java.lang package?
JavaSE 6 API just tells us which ones belong to this package: basically its the String, StringBuilder, StringBuffer, Thread, wrappers (Integer, Float,...), Object, System, Runtime, Exception, and a lot of other classes which you can use directly.

The real exam always has line numbers on the left side of the code, so if you see that it does not start with line 1, you don't have to worry about the imports, and assume that the imports (and packages) are right.
If the code starts at line 1, just assume you're looking at the entire file. If you see that the code uses classes that belong to other packages besides java.lang, (e.g class File needs import java.io.*) then you can say for sure that the right answer is "compilation fails" due to missing imports.

Default package
If you have a class within the default package (no package declaration is found), and you create another class that has a relashionship with the first one, then no import is needed (because both are in the default package);

1. public class A{
2. int i=0;
3. }

1. public class B extends A{
2. }

Theme color generator

Kuler is a cool website from Adobe, to generate color themes.
Or you can also try the Color Scheme Designer.

Thursday, January 3, 2013

Java Web Start Cache Viewer is not showing cached applications!

I have a Windows 7 64-bit with Java installed (no matter what version it is) and my Java Web Start Cache Viewer is not showing cached applications!
With this 64-bit Windows 7, when I go to Start -> Settings -> Control Panel -> Java, then click at General tab, "View" button, no cached applications are seen, but I've just downloaded and run a jnlp file just a minute ago.
There is something wrong in here.

So, I googled it, and found the solution that I wish to share with you.

1. Run the cmd window from C:\Windows\SysWOW64
2. Download and run again the jnlp with the command: javaws <url of the jnlp file>
3. Type the command: javaws -viewer

Now the cached application loaded from the jnlp file is displayed correctly in this Java Cache Viewer window and you are able to add a shortcut to it from your desktop. Just right click the cached application and select "Install Shortcuts" from the context menu.

That's it!


Monday, December 17, 2012

Whizlabs SCJP 6.0 Simulator "Error parsing question"

If you get an error message at the Whizlabs SCJP 6.0 Simulator saying "Error parsing question" at the start of an exame, ignore it and take the exame again.

If at the end of the exam, you have a message box that does not allow you to check you score, ignore it and go to the "Performance History". From there, you are able to check your score and review your questions.

Sunday, December 9, 2012

SCJP 6 Questions - Question 63

 class C {  
   public static void main ( String ka [ ] ) {  
     while ( false ) {  
       System.out.println ( "Value" ) ;  
     }  
   }  
 }  

What is the output?
1. compile time error
2. prints Value infinitely
3. Runtime Exception
4. None of the above

Thursday, September 27, 2012

SCJP/OCP Java 6 Resources

The Oracle Certified Professional (OCP), Java Standard Edition (SE) 6 Programmer certification is an entry-level credential that validates your skills in the Java programming language.

I'm studying for the SCJP 310-065 which stands for Sun Certified Java Programmer, for Java 6.0.
But, as you know, the Sun was bought by Oracle and the exam code has changed. Now, the official Oracle exam code is 1Z0-851: Java Standard Edition 6 Programmer Certified Professional Exam


I'm reading the Kathy Sierra and Bert Bates book SCJP Sun Certified Programmer for Java 6 Exam 310-065, from McGraw Hill,  and until now everything is clear as crystal - unless for some details that I don't work with in my daily job as a Java Programmer. But I'm learning all these details! From this book I recommend the "Two Minute Drill", that comes in the end of each chapter, that has all the details that you need to know from each chapter.

I also have the book OCP Java SE 6 Programmer Practice Exams (Exam 310-065) (Certification Press), also from Kathy Sierra and Bert Bates, for practicing (these are really hard exams!):


But... who are these two guys?
Why should I read and prepare with their books?

Kathy Sierra is a co-developer of the SCJP exam and Sun's practice exam. She is also a Sun Certified Java Instructor and the founder of the world's largest Java certification website, Javaranch.com.
Bert Bates is a Sun Certified Programmer for Java and has participated in the development of the SCJP exam and Sun's practice exam. He is the coauthor, with Kathy Sierra, of the previous editions of this book.

So, now you can see why these two books are very important for studying for the certification.

Besides these books, I intend to have some Mock Tests that are available online, before going to the exam:
Learning sources:
Schedule Exam at:
Other resources:

Books: