Title: Sun Certified Programmer for the Java Platform, Standard Edition 6 questions
Description:The Sun Certified Programmer for Java Platform, Standard Edition 6 certification exam is for programmers experienced using the Java programming language. Achieving this certification provides evidence that a programmer understands the basic syntax and structure of the Java programming language and can create Java technology applications that run on server and desktop systems using Java Platform, Standard Edition 6 Sun strongly recommends that all new candidates interested in becoming a Sun Certified Java Programmer (SCJP) take this new version of the certification exam, rather than a previous version. In this way, candidates can demonstrate that they are knowledgeable in the latest technology. Sun also recommends that those certified on a previous version of SCJP update their credentials by taking the SCJP 6 Upgrade exam
Number of questions: 60 questions
Has explanations: Yes
Objectives:
- Section 1: Declarations, Initialization and Scoping
- Section 2: Flow Control
- API Contents
- Section 4: Concurrency
- Section 5: OO Concepts
- Section 6: Collections / Generics
- Section 7: Fundamentals
- General Security Concepts 30%
- Communication Security 20%
- Infrastructure Security 20%
- Basics of Cryptography 15%
- Operational / Organizational Security 15%
Given:
10. public class Bar {
11. static void foo( int...x ) {
12. // insert code here
13. }
14. }
Which two code fragments, inserted independently at line 12, will allow the class to compile?
(Choose two.)
Answer(s)
- foreach( x ) System .out.println(z);
- for( int z : x ) System.out.println(z);
- while( x.hasNext() ) System.out.println( x.next() );
- for( int i=0; i< x.length; i++) System.out.println(x[i]);
Correct Answer
- for( int z : x ) System.out.println(z);
- for( int i=0; i< x.length; i++) System.out.println(x[i]);