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

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

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

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

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

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

السؤال #1
Given: public class product { int id; int price; public Product (int id, int price) { this.id = id; this.price = price; } public String toString() { return id + “:” + price; } } and the code fragment: List products = Arrays.asList(new Product(1, 10), new Product (2, 30), new Product (2, 30)); Product p = products.stream().reduce(new Product (4, 0), (p1, p2) -> { p1.price+=p2.price; return new Product (p1.id, p1.price);}); products.add(p); products.stream().parallel() .reduce((p1, p2) - > p1.price >
A. 2 : 30
B. 4 : 0
C. 4 : 60
D. 4 : 602 : 303 : 201 : 10
E. The program prints nothing
عرض الإجابة
اجابة صحيحة: C
السؤال #2
Given the code fragment: public static void main (String[] args) throws IOException { BufferedReader brCopy = null; try (BufferedReader br = new BufferedReader (new FileReader(“employee.txt”))) { // line n1 br.lines().forEach(c -> System.out.println(c)); brCopy = br; //line n2 } brCopy.ready(); //line n3; } Assume that the ready method of the BufferedReader, when called on a closed BufferedReader, throws an exception, and employee.txt is accessible and contains valid text. What is the result?
A. A compilation error occurs at line n3
B. A compilation error occurs at line n1
C. A compilation error occurs at line n2
D. The code prints the content of the employee
عرض الإجابة
اجابة صحيحة: D
السؤال #3
Given the code fragment: public class Foo { public static void main (String [ ] args) { Map unsortMap = new HashMap< > ( ); unsortMap.put (10, “z”); unsortMap.put (5, “b”); unsortMap.put (1, “d”); unsortMap.put (7, “e”); unsortMap.put (50, “j”); Map treeMap = new TreeMap (new Comparator ( ) { @Override public int compare (Integer o1, Integer o2) {return o2.compareTo (o1); } } ); treeMap.putAll (unsortMap); for (Map.Entry entry : t
A. A compilation error occurs
B. d b e z j
C. j z e b d
D. z b d e j
عرض الإجابة
اجابة صحيحة: B
السؤال #4
Given the structure of the Student table: Student (id INTEGER, name VARCHAR) Given the records from the STUDENT table: Given the code fragment: Assume that: The required database driver is configured in the classpath. The appropriate database is accessible with the dbURL, userName, and passWord exists. What is the result?
A. The program prints Status: true and two records are deleted from the Student table
B. The program prints Status: false and two records are deleted from the Student table
C. A SQLException is thrown at runtime
D. The program prints Status: false but the records from the Student table are not deleted
عرض الإجابة
اجابة صحيحة: E
السؤال #5
Given the code fragment: BiFunction val = (t1, t2) -> t1 + t2; //line n1 System.out.println(val.apply(10, 10.5)); What is the result?
A. 20
B. 20
C. A compilation error occurs at line n1
D. A compilation error occurs at line n2
عرض الإجابة
اجابة صحيحة: C
السؤال #6
Which statement is true about the DriverManager class?
A. It returns an instance of Connection
B. it executes SQL statements against the database
C. It only queries metadata of the database
D. it is written by different vendors for their specific database
عرض الإجابة
اجابة صحيحة: B
السؤال #7
Which code fragment is required to load a JDBC 3.0 driver?
A. Connection con = Connection
B. Class
C. Connection con = DriverManager
D. DriverManager
عرض الإجابة
اجابة صحيحة: B
السؤال #8
Given: Item table ? ID, INTEGER: PK ? DESCRIP, VARCHAR(100) ? PRICE, REAL ? QUANTITY< INTEGER And given the code fragment: 9. try { 10. Connection conn = DriveManager.getConnection(dbURL, username, password); 11. String query = “Select * FROM Item WHERE ID = 110”; 12. Statement stmt = conn.createStatement(); 13. ResultSet rs = stmt.executeQuery(query); 14. while(rs.next()) { 15. System.out.println(“ID: “ + rs.getInt(“Id”)); 16. System.out.println(“Description: “ + rs.getString(“Descrip”)); 17. System.out.pr
A. An exception is thrown at runtime
B. Compilation fails
C. The code prints Error
D. The code prints information about Item 110
عرض الإجابة
اجابة صحيحة: D
السؤال #9
and the code fragment? What is the result?
A. $15
B. 15 $
C. USD 15
D. USD $15
عرض الإجابة
اجابة صحيحة: D
السؤال #10
Given: public class Customer { private String fName; private String lName; private static int count; public customer (String first, String last) {fName = first, lName = last; ++count;} static { count = 0; } public static int getCount() {return count; } } public class App { public static void main (String [] args) { Customer c1 = new Customer(“Larry”, “Smith”); Customer c2 = new Customer(“Pedro”, “Gonzales”); Customer c3 = new Customer(“Penny”, “Jones”); Customer c4 = new Customer(“Lars”, “Svenson”); c4 = nu
A. 2
B. 3
C. 4
D. 5
عرض الإجابة
اجابة صحيحة: C
السؤال #11
Given: and the command: java Product 0 What is the result?
A. An AssertionError is thrown
B. A compilation error occurs at line n1
C. New Price: 0
D. A NumberFormatException is thrown at run time
عرض الإجابة
اجابة صحيحة: A
السؤال #12
Given the code fragments: public class Book implements Comparator { String name; double price; public Book () {} public Book(String name, double price) { this.name = name; this.price = price; } public int compare(Book b1, Book b2) { return b1.name.compareTo(b2.name); } public String toString() { return name + “:” + price; } } and Listbooks = Arrays.asList (new Book (“Beginning with Java”, 2), new book (“A Guide to Java Tour”, 3)); Collections.sort(books, new Book()); System.out.print(books); Wha
A. [A Guide to Java Tour:3
B. [Beginning with Java:2, A Guide to Java Tour:3]
C. A compilation error occurs because the Book class does not override the abstract method compareTo()
D. An Exception is thrown at run time
عرض الإجابة
اجابة صحيحة: A
السؤال #13
Given: class Vehicle { int vno; String name; public Vehicle (int vno, String name) { this.vno = vno,; this.name = name; } public String toString () { return vno + “:” + name; } } and this code fragment: Set vehicles = new TreeSet <> (); vehicles.add(new Vehicle (10123, “Ford”)); vehicles.add(new Vehicle (10124, “BMW”)); System.out.println(vehicles); What is the result?
A. 10123 Ford10124 BMW
B. 10124 BMW10123 Ford
C. A compilation error occurs
D. A ClassCastException is thrown at run time
عرض الإجابة
اجابة صحيحة: D
السؤال #14
Given: Which two interfaces can you use to create lambda expressions? (Choose two.)
A. T
B. R
C. P
D. S
E. Q
F. U
عرض الإجابة
اجابة صحيحة: C
السؤال #15
Which class definition compiles?
A. Option A
B. Option B
C. Option C
D. Option D
عرض الإجابة
اجابة صحيحة: D

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

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

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

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