Whizlabs offers SCJP 6.0 Exam Simulator with 420 questions as per the SCJP 6.0 certification exam. Following are couple of sample SCJP Dumps.

Topic: API Concepts

Question statement: Which of the following are true about the File class? Select two choices.

Choices:

  1. You can perform file I/O operations using its methods.
  2. You can find the size of a file using its size() method.
  3. You can check if a file exists using its exists() method.
  4. You can delete a file using its delete() method.





Click here for correct answer and explaination

Correct Anawer: C & D

Explaination:

Choices C and D are the correct answers. The exists() method of the File class returns true if the file given by the abstract path name physically exists. The delete() method can be used to delete the file represented by the File object. Choice A is incorrect because we cannot perform read/write operations on files using the File object. Choice B is incorrect because the File class does not define a size() method, it defines the length() method to find the size of a file. Reference: http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html


Topic: OO Concerpts

Question statement: Which of the following is true about the takeOrdersAndServe() method in the below code?

class Waitor
{
     void takeOrders(){}
     void serveFood(){}
     void takeOrdersAndServe()
     {
          takeOrders();
          serveFood();
     }
}

Choices:

  1. It exhibits high cohesion
  2. It exhibits low cohesion
  3. It exhibits tight coupling
  4. It exhibits loose coupling





Click here for correct answer and explaination

Correct Anawer: B

Explaination:

Choice B is the correct answer.

Cohesion refers to the number and diversity of tasks that a single unit is responsible for. If each unit is responsible for one single logical task, we say it has high cohesion.

Cohesion applies to classes and methods. Here the takeOrdersAndServe() method is not focused on a single task, so it shows low cohesion. A well designed unit will have high cohesion.

More about coupling, cohesion and other related concepts here.
http://satc.gsfc.nasa.gov/support/STC_APR98/apply_oo/apply_oo.html

 


What's Next?
SCJP 6.0 Exam Simulator You can try out our 15 Questions Trial Test for FREE. Till now more than 19,000 participants have appeared in the trial exam . Try out the test and assess your rank compare to other test takers. This will help you to assess your strengths, weaknesses, speed and accuracy level in each Objective of SCJP 6 Certification Exam.




Customer Reviews

Hi Whizlabs Team, First, I want to let you know that i appeared for PMP exam on Sept 12, 2009 and passed on first attempt. Your PMP simulator was a big help in preparation.

By Murad Sitwat Read More....

Thanks for your best wishes. I passed scdjws yesterday without any experience with 2 months preparations. I thank all whizlabs team members. I am planning to take the scbcd

By Naveen Katoch Read More....

I took the SCJP exam and passed it on my first try. The whizlabs exam preparation was a valuable learning resource and I plan on using it again to prepare for (possible) further sun certifications.

By Daniel Kummer Read More....

Sending your message. Please wait...

Thanks for sending your message! We will get back to you shortly.

There was a problem sending your message. Please try again.

Please complete all the fields in the form before sending.