Java SE de en
temelde associate akabinde professionall geliyor
1.Java Associate Programmer I
certificate exam
|
|||||||||||||||||||||
|
Baslica Konular:
(Ozellikle programla dan girecekseniz OCPJP): access control, object
orientation, assignments, operators, flow control, assertions, string handling,
I/O, parsing, formatting, generics, collections, inner classes, threads and the
JDK tools.
Sinav Dili:
Testler cesitli dillerde olabiliyor: Ingilizce, Japonca, Cince, Almanca,
Korece, Portekizce, Rusca ve Ispanyolca.
Örnek
sorular oracle java da var
1. Given:
public class Sequence {
Sequence() { System.out.print("c "); }
{ System.out.print("y "); }
public static void main(String[] args) {
new Sequence().go();
}
void go() { System.out.print("g "); }
static { System.out.print("x "); }
}
What is the result?
A) c x y g
B) c g x y
C) x c y g
D) x y c g
E) y x c g
F) y c g x
public class Sequence {
Sequence() { System.out.print("c "); }
{ System.out.print("y "); }
public static void main(String[] args) {
new Sequence().go();
}
void go() { System.out.print("g "); }
static { System.out.print("x "); }
}
What is the result?
A) c x y g
B) c g x y
C) x c y g
D) x y c g
E) y x c g
F) y c g x
2. Given:
public class MyStuff {
MyStuff(String n) { name = n; }
String name;
public static void main(String[] args) {
MyStuff m1 = new MyStuff("guitar");
MyStuff m2 = new MyStuff("tv");
System.out.println(m2.equals(m1));
}
public boolean equals(Object o) {
MyStuff m = (MyStuff) o;
if(m.name != null)
return true;
return false;
}
}
What is the result?
A) The output is "true" and MyStuff fulfills the Object.equals() contract.
B) The output is "false" and MyStuff fulfills the Object.equals() contract.
C) The output is "true" and MyStuff does NOT fulfill the Object.equals() contract.
D) The output is "false" and MyStuff does NOT fulfill the Object.equals() contract
E) Compilation fails
public class MyStuff {
MyStuff(String n) { name = n; }
String name;
public static void main(String[] args) {
MyStuff m1 = new MyStuff("guitar");
MyStuff m2 = new MyStuff("tv");
System.out.println(m2.equals(m1));
}
public boolean equals(Object o) {
MyStuff m = (MyStuff) o;
if(m.name != null)
return true;
return false;
}
}
What is the result?
A) The output is "true" and MyStuff fulfills the Object.equals() contract.
B) The output is "false" and MyStuff fulfills the Object.equals() contract.
C) The output is "true" and MyStuff does NOT fulfill the Object.equals() contract.
D) The output is "false" and MyStuff does NOT fulfill the Object.equals() contract
E) Compilation fails
3. Given:
import java.util.*;
public class Primes {
public static void main(String[] args) {
List p = new ArrayList();
p.add(7);
p.add(2);
p.add(5);
p.add(2);
p.sort();
System.out.println(p);
}
}
What is the result?
A) [2, 5, 7]
B) [2, 2, 5, 7]
C) [7, 2, 5, 2]
D) [7, 5, 2, 2]
E) Compilation fails
import java.util.*;
public class Primes {
public static void main(String[] args) {
List p = new ArrayList();
p.add(7);
p.add(2);
p.add(5);
p.add(2);
p.sort();
System.out.println(p);
}
}
What is the result?
A) [2, 5, 7]
B) [2, 2, 5, 7]
C) [7, 2, 5, 2]
D) [7, 5, 2, 2]
E) Compilation fails
4. Given:
public class MyLoop {
public static void main(String[] args) {
String[] sa = {"tom ", "jerry "};
for(int x = 0; x < 3; x++) {
for(String s: sa) {
System.out.print(x + " " + s);
if( x == 1) break;
}
}
}
}
What is the result?
A) 0 tom 0 jerry 1 tom
B) 0 tom 0 jerry 1 tom 1 jerry
C) 0 tom 0 jerry 2 tom 2 jerry
D) 0 tom 0 jerry 1 tom 2 tom 2 jerry
E) 0 tom 0 jerry 1 tom 1 jerry 2 tom 2 jerry
F) Compilation fails.
public class MyLoop {
public static void main(String[] args) {
String[] sa = {"tom ", "jerry "};
for(int x = 0; x < 3; x++) {
for(String s: sa) {
System.out.print(x + " " + s);
if( x == 1) break;
}
}
}
}
What is the result?
A) 0 tom 0 jerry 1 tom
B) 0 tom 0 jerry 1 tom 1 jerry
C) 0 tom 0 jerry 2 tom 2 jerry
D) 0 tom 0 jerry 1 tom 2 tom 2 jerry
E) 0 tom 0 jerry 1 tom 1 jerry 2 tom 2 jerry
F) Compilation fails.
5. Given:
interface Rideable {
String getGait();
}
public class Camel implements Rideable {
int weight = 2;
public static void main(String[] args) {
new Camel().go(8);
}
void go(int speed) {
++speed;
weight++;
int walkrate = speed * weight;
System.out.print(walkrate + getGait());
}
String getGait() {
return " mph, lope";
}
}
What is the result?
A) 16 mph, lope
B) 18 mph, lope
C) 24 mph, lope
D) 27 mph, lope
E) Compilation fails.
F) An exception is thrown at run time.
interface Rideable {
String getGait();
}
public class Camel implements Rideable {
int weight = 2;
public static void main(String[] args) {
new Camel().go(8);
}
void go(int speed) {
++speed;
weight++;
int walkrate = speed * weight;
System.out.print(walkrate + getGait());
}
String getGait() {
return " mph, lope";
}
}
What is the result?
A) 16 mph, lope
B) 18 mph, lope
C) 24 mph, lope
D) 27 mph, lope
E) Compilation fails.
F) An exception is thrown at run time.
6. Given:
class Alpha {
String getType() { return "alpha"; }
}
class Beta extends Alpha {
String getType() { return "beta"; }
}
class Gamma extends Beta {
String getType() { return "gamma"; }
public static void main(String[] args) {
Gamma g1 = new Alpha();
Gamma g2 = new Beta();
System.out.println(g1.getType() + " "
+ g2.getType());
}
}
What is the result?
A) alpha beta
B) beta beta
C) gamma gamma
D) alpha alpha
E) Compilation fails.
class Alpha {
String getType() { return "alpha"; }
}
class Beta extends Alpha {
String getType() { return "beta"; }
}
class Gamma extends Beta {
String getType() { return "gamma"; }
public static void main(String[] args) {
Gamma g1 = new Alpha();
Gamma g2 = new Beta();
System.out.println(g1.getType() + " "
+ g2.getType());
}
}
What is the result?
A) alpha beta
B) beta beta
C) gamma gamma
D) alpha alpha
E) Compilation fails.
7. Given:
class Feline {
public String type = "f ";
public Feline() {
System.out.print("feline ");
}
}
public class Cougar extends Feline {
public Cougar() {
System.out.print("cougar ");
}
public static void main(String[] args) {
new Cougar().go();
}
void go() {
type = "c ";
System.out.print(this.type + super.type);
}
}
What is the result?
A) cougar c c
B) cougar c f
C) feline cougar c c
D) feline cougar c f
E) Compilation fails
F) An exception is thrown at run time.
class Feline {
public String type = "f ";
public Feline() {
System.out.print("feline ");
}
}
public class Cougar extends Feline {
public Cougar() {
System.out.print("cougar ");
}
public static void main(String[] args) {
new Cougar().go();
}
void go() {
type = "c ";
System.out.print(this.type + super.type);
}
}
What is the result?
A) cougar c c
B) cougar c f
C) feline cougar c c
D) feline cougar c f
E) Compilation fails
F) An exception is thrown at run time.
8. Given:
1. public class Issues {
2. public static void main(String[] args) {
3. try {
4. doStuff();
5. }
6. catch (Exception e) {
7. System.out.print("catch block ");
8. }
9. finally {
10. System.out.print("finally block ");
11. }
12. }
13. static void doStuff() {
14. throw new Error();
15. }
16. }
What is the result?
A) finally block
B) catch block finally block
C)
Exception in thread "main" java.lang.Error
at Issues.doStuff(Issues.java:14)
at Issues.main(Issues.java: 4)
finally block
D)
finally block
Exception in thread "main" java.lang.Error
at Issues.doStuff(Issues.java:14)
at Issues.main(Issues.java: 4)
E) Compilation fails at line 4.
F) Compilation fails at line 14.
1. public class Issues {
2. public static void main(String[] args) {
3. try {
4. doStuff();
5. }
6. catch (Exception e) {
7. System.out.print("catch block ");
8. }
9. finally {
10. System.out.print("finally block ");
11. }
12. }
13. static void doStuff() {
14. throw new Error();
15. }
16. }
What is the result?
A) finally block
B) catch block finally block
C)
Exception in thread "main" java.lang.Error
at Issues.doStuff(Issues.java:14)
at Issues.main(Issues.java: 4)
finally block
D)
finally block
Exception in thread "main" java.lang.Error
at Issues.doStuff(Issues.java:14)
at Issues.main(Issues.java: 4)
E) Compilation fails at line 4.
F) Compilation fails at line 14.
Answers
1. D
2. C
3. E
4. D
5. E
6. E
7. C
8. D
2. C
3. E
4. D
5. E
6. E
7. C
8. D
2. Java SE
7 professional Certified Programmers
İlk şartı birinci sertifikanızı almış olmanız gerekir
|
|
||||||||||||||||||||
|
Java SE 7 Programmer II
- Sample Questions
Sample Questions
Sample questions are provided solely to
familiarize candidates with the multiple-choice format and writing style of
questions that will be found on the exam. Sample questions may not cover the
full spectrum of difficulty that is covered by the exam questions. Success on
the sample questions does not predict success on the exam..
1.Given:
import java.util.*;
public class Primes2 {
public static void main(String[] args) {
Integer[] primes = {2, 7, 5, 3};
MySort ms = new MySort();
Arrays.sort(primes, ms);
for(Integer p2: primes)
System.out.print(p2 + " ");
}
static class MySort implements Comparator {
public int compare(Integer x, Integer y) {
return y.compareTo(x);
}
}
}
What is the result?
A) 2 3 5 7
B) 2 7 5 3
C) 7 5 3 2
D) Compilation fails.
import java.util.*;
public class Primes2 {
public static void main(String[] args) {
Integer[] primes = {2, 7, 5, 3};
MySort ms = new MySort();
Arrays.sort(primes, ms);
for(Integer p2: primes)
System.out.print(p2 + " ");
}
static class MySort implements Comparator {
public int compare(Integer x, Integer y) {
return y.compareTo(x);
}
}
}
What is the result?
A) 2 3 5 7
B) 2 7 5 3
C) 7 5 3 2
D) Compilation fails.
2. Given:
class Class1 {
String v1;
}
class Class2 {
Class1 c1;
String v2;
}
public class Class3 {
Class2 c1;
String i3;
}
Which three options correctly describe the relationship between the classes?
A) Class2 has-a i3
B) Class1 has-a v2
C) Class2 has-a v2
D) Class3 has-a v1
E) Class2 has-a Class3
F) Class2 has-a Class1
class Class1 {
String v1;
}
class Class2 {
Class1 c1;
String v2;
}
public class Class3 {
Class2 c1;
String i3;
}
Which three options correctly describe the relationship between the classes?
A) Class2 has-a i3
B) Class1 has-a v2
C) Class2 has-a v2
D) Class3 has-a v1
E) Class2 has-a Class3
F) Class2 has-a Class1
3. Given this code snippet:
Map m = new HashMap();
MyKeys m1 = new MyKeys(1);
MyKeys m2 = new MyKeys(2);
MyKeys m3 = new MyKeys(1);
MyKeys m4 = new MyKeys(new Integer(2));
m.put(m1, "car");
m.put(m2, "boat");
m.put(m3, "plane");
m.put(m4, "hovercraft");
System.out.print(m.size());
And this class:
class MyKeys {
Integer key;
MyKeys(Integer k) { key = k; }
public boolean equals(Object o) {
return ((MyKeys)o).key == this.key;
}
}
What is the result?
A) 2
B) 3
C) 4
D) Compilation fails.
E) An exception is thrown at run time.
Map m = new HashMap();
MyKeys m1 = new MyKeys(1);
MyKeys m2 = new MyKeys(2);
MyKeys m3 = new MyKeys(1);
MyKeys m4 = new MyKeys(new Integer(2));
m.put(m1, "car");
m.put(m2, "boat");
m.put(m3, "plane");
m.put(m4, "hovercraft");
System.out.print(m.size());
And this class:
class MyKeys {
Integer key;
MyKeys(Integer k) { key = k; }
public boolean equals(Object o) {
return ((MyKeys)o).key == this.key;
}
}
What is the result?
A) 2
B) 3
C) 4
D) Compilation fails.
E) An exception is thrown at run time.
4. Given:
import java.util.*;
public class MyScan {
public static void main(String[] args) {
String in = "1 a 10 . 100 1000";
Scanner s = new Scanner(in);
int accum = 0;
for(int x = 0; x < 4; x++) {
accum += s.nextInt();
}
System.out.println(accum);
}
}
What is the result?
A) 4
B) 10
C) 111
D) 1111
E) Compilation fails.
F) An exception is thrown at run time.
import java.util.*;
public class MyScan {
public static void main(String[] args) {
String in = "1 a 10 . 100 1000";
Scanner s = new Scanner(in);
int accum = 0;
for(int x = 0; x < 4; x++) {
accum += s.nextInt();
}
System.out.println(accum);
}
}
What is the result?
A) 4
B) 10
C) 111
D) 1111
E) Compilation fails.
F) An exception is thrown at run time.
5. Given:
public class Truthy {
public static void main(String[] args) {
int x = 7;
assert(x == 6) ? "x == 6" : "x != 6";
}
}
What is the result if you try to compile Truthy.java and then run it with assertions enabled?
A) Truthy.java does NOT compile.
B) Truthy.java compiles and the output is "x != 6".
C) Truthy.java compiles and an AssertionError is thrown with no additional output.
D) Truthy.java compiles and an AssertionError is thrown with "x != 6" as additional output.
public class Truthy {
public static void main(String[] args) {
int x = 7;
assert(x == 6) ? "x == 6" : "x != 6";
}
}
What is the result if you try to compile Truthy.java and then run it with assertions enabled?
A) Truthy.java does NOT compile.
B) Truthy.java compiles and the output is "x != 6".
C) Truthy.java compiles and an AssertionError is thrown with no additional output.
D) Truthy.java compiles and an AssertionError is thrown with "x != 6" as additional output.
6.Given the code fragment:
try {
// assume "conn" is a valid Connection
// assume a valid Statement object is created
// assume rollback invocations will be valid
// use SQL to add 10 to a checking account
Savepoint s1 = conn.setSavePoint();
// use SQL to add 100 to the same checking account
Savepoint s2 = conn.setSavePoint();
// use SQL to add 1000 to the same checking account
// insert valid rollback method invocation here
} catch (Exception e) { }
Which two statements are true?
A) If conn.rollback(s1) is inserted, account will be incremented by 10.
B) If conn.rollback(s1) is inserted, account will be incremented by 1010.
C) If conn.rollback(s2) is inserted, account will be incremented by 100.
D) If conn.rollback(s2) is inserted, account will be incremented by 110.
E) If conn.rollback(s2) is inserted, account will be incremented by 1000.
try {
// assume "conn" is a valid Connection
// assume a valid Statement object is created
// assume rollback invocations will be valid
// use SQL to add 10 to a checking account
Savepoint s1 = conn.setSavePoint();
// use SQL to add 100 to the same checking account
Savepoint s2 = conn.setSavePoint();
// use SQL to add 1000 to the same checking account
// insert valid rollback method invocation here
} catch (Exception e) { }
Which two statements are true?
A) If conn.rollback(s1) is inserted, account will be incremented by 10.
B) If conn.rollback(s1) is inserted, account will be incremented by 1010.
C) If conn.rollback(s2) is inserted, account will be incremented by 100.
D) If conn.rollback(s2) is inserted, account will be incremented by 110.
E) If conn.rollback(s2) is inserted, account will be incremented by 1000.
7. Given:
public class Bees {
public static void main(String[] args) {
try {
new Bees().go();
} catch (Exception e ) {
System.out.println("thrown to main");
}
}
synchronized void go() throws InterruptedException {
Thread t1 = new Thread();
t1.start();
System.out.print("1 ");
t1.wait(5000);
System.out.print("2 ");
}
}
What is the result?
A) 1 then 2 with little delay
B) 1 then 2 after 5 seconds
C) 1 thrown to main
D) 1 2 thrown to main
E) Compilation fails.
public class Bees {
public static void main(String[] args) {
try {
new Bees().go();
} catch (Exception e ) {
System.out.println("thrown to main");
}
}
synchronized void go() throws InterruptedException {
Thread t1 = new Thread();
t1.start();
System.out.print("1 ");
t1.wait(5000);
System.out.print("2 ");
}
}
What is the result?
A) 1 then 2 with little delay
B) 1 then 2 after 5 seconds
C) 1 thrown to main
D) 1 2 thrown to main
E) Compilation fails.
8. Given:
import java.text.*;
public class Align {
public static void main(String[] args) {
String[] sa = {"111.234", "222.5678"};
NumberFormat nf = NumberFormat.getInstance();
nf.setMaximumFractionDigits(3);
for(String s: sa)
System.out.println(nf.parse(s));
}
}
What is the result?
A) 111.234
222.567
B) 111.234
222.568
C) 111.234
222.5678
D) Compilation fails.
E) An exception is thrown at run time.
import java.text.*;
public class Align {
public static void main(String[] args) {
String[] sa = {"111.234", "222.5678"};
NumberFormat nf = NumberFormat.getInstance();
nf.setMaximumFractionDigits(3);
for(String s: sa)
System.out.println(nf.parse(s));
}
}
What is the result?
A) 111.234
222.567
B) 111.234
222.568
C) 111.234
222.5678
D) Compilation fails.
E) An exception is thrown at run time.
1. D
2. C, D, F
3. C
4. F
5. A
6. A, D
7. C
8. D
2. C, D, F
3. C
4. F
5. A
6. A, D
7. C
8. D
Detayli Bilgiye Wiki sayfasindan
ulasabilirsiniz:
Ornek sorulara asagidaki
linklerden bakabilirsiniz.
Sinava
Hazirlik icin Kitaplar:
A Programmer's Guide to Java SCJP Certification: A
Comprehensive Primer (3rd Edition)
Java 2 Certification Training Guide By Jamie Jaworski
Java 2 Exam Cram By Brogan & Brogan
The Complete Java 2 Certification Study
Guide By various authors
A Programmer’s Guide to Java SCJP Certification By Khalid Mughal, Rolf Rasussen
İnternetten pdf ni bulabiliyormuşuz….
JAVA EE
JAVA EE İÇİN
de iki kısımdan oluşuyor expert
ve Professional
Kısımlarda 4 türlü
sertifika mevcut
1.JAVA EE
Enterprise,JavaBeans Devoloper
2. JAVA PERSISTENCE API
DEVELOPER
3. JAVA EE WEB SERVİCES
DEVELOPER
4.JAVA platform,WEB
COMPONENT DEVELOPER
BUNLARIN HEPSİNDE DE İLK
ŞART PROFESSIONAL JAVA SE (JAVA II) SERTİFİKANIZ OLMASI GEREKİYOR.
|
|
1.JAVA EE
Enterprise,JavaBeans Devoloper
ŞART JAVA SE DE
PROFESSIONAL SERTİFİKANIZ MEVCUT OLMALI
|
|
||||||||||||||||||||
|
2. JAVA PERSISTENCE API
DEVELOPER
|
|||||||||||||||||||||
|
3. JAVA EE WEB SERVİCES
DEVELOPER
|
|||||||||||||||||||||
|
4.JAVA platform,WEB
COMPONENT DEVELOPER
|
|||||||||||||||||||||
|
YORUMLAR:
OCP sertifikasının ardından bir haftamı OCE
sertifika sınavına hazırlanarak geçirdim. OCP ve OCE sınavlarını
karşılaştırırsam OCP çalışması daha sıkıcı bir sınav, OCE çok daha fazla bilgi
ağırlıklı soruda geçen sınıfı veya jsp tagını biliyorsanız 10 saniyede soruya
cevap verebiliyorsunuz. Yani daha önceden JEE development yapmadıysanız Servlet
nedir Filter nedir Listener nedir session ile requestin farkı nedir gibi Java
Web development ile ilgili temel konuları bilmiyorsanız biraz daha vakit
alabilir hazırlanması onun dışında bir iki hafta yeterli. Diğer sınavlarda
olduğu gibi herhangi bir kaynaktan bakmadım doğrudan soruları çözdüm ve
yanlışlarımı internetten bakaraktan düzelte düzelte ilerledim. Sonuç olarak JEE
ile ilgili daha önceden bilmediğim bir çok konuda bilgi sahibi oldum o yüzden
bu sertifika bence daha yararlı bir sertifika diyebilirim. Bir çoğumuz artık
Java web development yaparken Servlet veya Filter gibi çok temel yapıları
doğrudan kullanmıyoruz bu yüzden de yararsız diye düşünülebilir. Bunların
yerine Spring, Play gibi frameworkler geldi artık ama yine de bu temel konuları
bilmek arkada neler döndüğü hakkında fikir veriyor.
BUNUN İLERİSİ
Oracle Enterprise Architect
SERTİFİKASI
Bunun için de bir sınav geçip verilen bir projeyi tamamlayıp
üstüne bir de 2000$ lik Oracle’dan eğitim almanız gerekiyor.