لا تريد أن تفوت شيئا؟

نصائح اجتياز امتحان الشهادة

آخر أخبار الامتحانات ومعلومات الخصم

برعاية وحديثة من قبل خبرائنا

نعم، أرسل لي النشرة الإخبارية

خذ اختبارات أخرى عبر الإنترنت

السؤال #1
Given the content: and given the code fragment: Which two code fragments, when inserted at line 1 independently, enable the code to print “Wie geht’s?”
A. currentLocale = new Locale (“de”, “DE”);
B. currentLocale = new Locale
C. currentLocale = Locale
D. currentlocale = new Locale(); currentLocale
E. currentLocale = Locale
عرض الإجابة
اجابة صحيحة: D
السؤال #2
Which two are elements of a singleton class? (Choose two.)
A. a transient reference to point to the single instance
B. a public method to instantiate the single instance
C. a public static method to return a copy of the singleton reference
D. a private constructor to the class
E. a public reference to point to the single instance
عرض الإجابة
اجابة صحيحة: A
السؤال #3
Given: 1. abstract class Shape { 2. Shape ( ) { System.out.println (“Shape”); } 3. protected void area ( ) { System.out.println (“Shape”); } 4. } 5. 6. class Square extends Shape { 7. int side; 8. Square int side { 9. /* insert code here */ 10. this.side = side; 11. } 12. public void area ( ) { System.out.println (“Square”); } 13. } 14. class Rectangle extends Square { 15. int len, br; 16. Rectangle (int x, int y) { 17. /* insert code here */ 18. len = x, br = y; 19. } 20. void area ( ) { System.out.println
A. At line 1, remove abstract
B. At line 9, insert super ( );
C. At line 12, remove public
D. At line 17, insert super (x);
E. At line 17, insert super (); super
F. At line 20, use public void area ( ) {
عرض الإجابة
اجابة صحيحة: AB
السؤال #4
Given the code fragment: Path file = Paths.get (“courses.txt”); // line n1 Assume the courses.txt is accessible. Which code fragment can be inserted at line n1 to enable the code to print the content of the courses.txt file?
A. List fc = Files
B. Stream fc = Files
C. List fc = readAllLines(file); fc
D. Stream fc = Files
عرض الإجابة
اجابة صحيحة: A
السؤال #5
Given: What is the result?
A. IT:null
B. A NullPointerException is thrown at run time
C. A compilation error occurs
D. IT:0
عرض الإجابة
اجابة صحيحة: A
السؤال #6
Given: class Book { int id; String name; public Book (int id, String name) { this.id = id; this.name = name; } public boolean equals (Object obj) { //line n1 boolean output = false; Book b = (Book) obj; if (this.name.equals(b name))} output = true; } return output; } } and the code fragment: Book b1 = new Book (101, “Java Programing”); Book b2 = new Book (102, “Java Programing”); System.out.println (b1.equals(b2)); //line n2 Which statement is true?
A. The program prints true
B. The program prints false
C. A compilation error occur
D. To ensure successful compilation, replace line n1 with:boolean equals (Book obj) {
E. A compilation error occur
F. To ensure successful compilation, replace line n2 with: System
عرض الإجابة
اجابة صحيحة: A
السؤال #7
Given the code fragment: What is the result?
A. 5 : 3 : 6
B. 6 : 5 : 6
C. 3 : 3 : 4
D. 4 : 4 : 4
عرض الإجابة
اجابة صحيحة: C
السؤال #8
Given the code fragment: ZonedDateTime depart = ZonedDateTime.of(2015, 1, 15, 3, 0, 0, 0, ZoneID.of(“UTC- 7”)); ZonedDateTime arrive = ZonedDateTime.of(2015, 1, 15, 9, 0, 0, 0, ZoneID.of(“UTC- 5”)); long hrs = ChronoUnit.HOURS.between(depart, arrive); //line n1 System.out.println(“Travel time is” + hrs + “hours”); What is the result?
A. Travel time is 4 hours
B. Travel time is 6 hours
C. Travel time is 8 hours
D. An exception is thrown at line n1
عرض الإجابة
اجابة صحيحة: C
السؤال #9
Given the code fragment: List values = Arrays.asList (1, 2, 3); values.stream () .map(n -> n*2) //line n1 .p eek(System.out::print) //line n2 .count(); What is the result?
A. 246
B. The code produces no output
C. A compilation error occurs at line n1
D. A compilation error occurs at line n2
عرض الإجابة
اجابة صحيحة: D
السؤال #10
Given: and the code fragment: What is the result?
A. An exception is thrown at line n2
B. 100
C. A compilation error occurs because the try block is declared without a catch or finally block
D. A compilation error occurs at line n1
عرض الإجابة
اجابة صحيحة: D
السؤال #11
Given: class Worker extends Thread { CyclicBarrier cb; public Worker(CyclicBarrier cb) { this.cb = cb; } public void run () { try { cb.await(); System.out.println(“Worker…”); } catch (Exception ex) { } } } class Master implements Runnable { //line n1 public void run () { System.out.println(“Master…”); } } and the code fragment: Master master = new Master(); //line n2 Worker worker = new Worker(cb); worker.start(); You have been asked to ensure that the run methods of both the Worker and Master classes are e
A. At line n2, insert CyclicBarrier cb = new CyclicBarrier(2, master);
B. Replace line n1 with class Master extends Thread {
C. At line n2, insert CyclicBarrier cb = new CyclicBarrier(1, master);
D. At line n2, insert CyclicBarrier cb = new CyclicBarrier(master);
عرض الإجابة
اجابة صحيحة: B
السؤال #12
Given: IntStream stream = IntStream.of (1,2,3); IntFunction inFu= x -> y -> x*y; //line n1 IntStream newStream = stream.map(inFu.apply(10)); //line n2 newStream.forEach(System.output::print); Which modification enables the code fragment to compile?
A. Replace line n1 with: IntFunction inFu = x -> y -> x*y;
B. Replace line n1 with: IntFunction inFu = x -> y -> x*y;
C. Replace line n1 with: BiFunction inFu = x -> y -> x*y;
D. Replace line n2 with:IntStream newStream = stream
عرض الإجابة
اجابة صحيحة: A
السؤال #13
Given the code fragment: What is the result?
A. A compilation error occurs
B. [Java, J2EE, J2ME, JSTL, JSP]
C. null
D. [Java, J2EE, J2ME, JSTL]
عرض الإجابة
اجابة صحيحة: C
السؤال #14
Which two methods from the java.util.stream.Stream interface perform a reduction operation? (Choose two.)
A. count ()
B. collect ()
C. distinct ()
D. peek ()
E. filter ()
عرض الإجابة
اجابة صحيحة: D
السؤال #15
Given the code fragment: What is the result?
A. A compilation error occurs at line n1
B. Checking…
C. Checking… Checking…
D. A compilation error occurs at line n2
عرض الإجابة
اجابة صحيحة: C
السؤال #16
Which statement is true about java.time.Duration?
A. It tracks time zones
B. It preserves daylight saving time
C. It defines time-based values
D. It defines date-based values
عرض الإجابة
اجابة صحيحة: AC
السؤال #17
Given the code fragment: public void recDelete (String dirName) throws IOException { File [ ] listOfFiles = new File (dirName) .listFiles(); if (listOfFiles ! = null && listOfFiles.length >0) { for (File aFile : listOfFiles) { if (aFile.isDirectory ()) { recDelete (aFile.getAbsolutePath ()); } else { if (aFile.getName ().endsWith (“.class”)) aFile.delete (); } } } } Assume that Projects contains subdirectories that contain .class files and is passed as an argument to the recDelete () method when it is invok
A. The method deletes all the
B. The method deletes the
C. The method executes and does not make any changes to the Projects directory
D. The method throws an IOException
عرض الإجابة
اجابة صحيحة: D
السؤال #18
Given: public interface Moveable { public default void walk (Integer distance) {System.out.println(“Walking”);) public void run(Integer distance); } Which statement is true?
A. Moveable can be used as below:Moveable animal = n - > System
B. Moveable can be used as below: Moveable animal = n - > n + 10; animal
C. Moveable can be used as below:Moveable animal = (Integer n) - > System
D. Movable cannot be used in a lambda expression
عرض الإجابة
اجابة صحيحة: C
السؤال #19
Which two statements are true about synchronization and locks? (Choose two.)
A. A thread automatically acquires the intrinsic lock on a synchronized statement when executed
B. The intrinsic lock will be retained by a thread if return from a synchronized method is caused by an uncaught exception
C. A thread exclusively owns the intrinsic lock of an object between the time it acquires the lock and the time itreleases it
D. A thread automatically acquires the intrinsic lock on a synchronized method’s object when entering that method
E. Threads cannot acquire intrinsic locks on classes
عرض الإجابة
اجابة صحيحة: B
السؤال #20
Given the code fragment: Path path1 = Paths.get(“/app/./sys/”); Path res1 = path1.resolve(“log”); Path path2 = Paths.get(“/server/exe/”); Path res1 = path1.resolve(“/readme/”); System.out.println(res1); System.out.println(res2); What is the result?
A. /app/sys/log/readme/server/exe
B. /app/log/sys/server/exe/readme
C. /app/
D. /app/
عرض الإجابة
اجابة صحيحة: D
السؤال #21
Given: class Sum extends RecursiveAction { //line n1 static final int THRESHOLD_SIZE = 3; int stIndex, lstIndex; int [ ] data; public Sum (int [ ]data, int start, int end) { this.data = data; this stIndex = start; this. lstIndex = end; } protected void compute ( ) { int sum = 0; if (lstIndex – stIndex <= THRESHOLD_SIZE) { for (int i = stIndex; i < lstIndex; i++) { sum += data [i]; } System.out.println(sum); } else { new Sum (data, stIndex + THRESHOLD_SIZE, lstIndex).fork( ); new Sum (data, stIndex, Math.min
A. The program prints several values that total 55
B. The program prints 55
C. A compilation error occurs at line n1
D. The program prints several values whose sum exceeds 55
عرض الإجابة
اجابة صحيحة: A
السؤال #22
Which two statements are true about the Fork/Join Framework? (Choose two.)
A. The RecursiveTask subclass is used when a task does not need to return a result
B. The Fork/Join framework can help you take advantage of multicore hardware
C. The Fork/Join framework implements a work-stealing algorithm
D. The Fork/Join solution when run on multicore hardware always performs faster than standard sequential solution
عرض الإجابة
اجابة صحيحة: A

عرض الإجابات بعد التقديم

يرجى إرسال البريد الإلكتروني الخاص بك والواتس اب للحصول على إجابات الأسئلة.

ملحوظة: يرجى التأكد من صلاحية معرف البريد الإلكتروني وWhatsApp حتى تتمكن من الحصول على نتائج الاختبار الصحيحة.

بريد إلكتروني:
رقم الواتس اب/الهاتف: