DEMO QUESTIONS

Q1: 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

Correct Answer: B, D

Q2: Given the code fragment: UnaryOperator uo1 = s -> s*2;line n1 List loanValues = Arrays.asList(1000.0, 2000.0); loanValues.stream() .filter(lv -> lv >= 1500) .map(lv -> uo1.apply(lv)) .forEach(s -> System.out.print(s + '' '')); What is the result?

A: 4000.0

B: 4000

C: A compilation error occurs at line n1.

D: A compilation error occurs at line n2.

Correct Answer: D

Q3: Given the code fragment: List str = Arrays.asList (''my'', ''pen'', ''is'', ''your', ''pen''); Predicate test = s -> { int i = 0; boolean result = s.contains (''pen''); System.out.print(i++) + '':''); return result; }; str.stream() .filter(test) .findFirst() .ifPresent(System.out ::print); What is the result?

A: 0 : 0 : pen

B: 0 : 1 : pen

C: 0 : 0 : 0 : 0 : 0 : pen

D: 0 : 1 : 2 : 3 : 4 :

E: A compilation error occurs.

Correct Answer: A

Q4: What is true about the jav a.sql.Statement interface?

A: It provides a session with the database.

B: It is used to get an instance of a Connection object by using JDBC drivers.

C: It provides a cursor to fetch the resulting data.

D: It provides a class for executing SQL statements and returning the results.

Correct Answer: D
[acf_quiz]

Testimonials – Real Results From Real Students

Your success is our priority. We’re proud to share authentic reviews from students who trusted us, passed their exams, and reached their goals with confidence.
John Doe
John Doe
This site has been a game-changer for my certification journey. The materials are current, reliable, and best of all—free! It's clear they're committed to supporting the IT community.
Emma
Emma
I passed my CompTIA Security+ exam on the first try thanks to this site. Their practice exams and study guides are top-notch. Highly recommend it to anyone serious about IT certifications.
Liam
Liam
I’ve passed three certifications using this site. Their materials are detailed and well-structured, and the fact that it’s free makes it even better.
Isabella
Isabella
If you're studying for any IT certification, this should be your first stop. It’s comprehensive, organized, and constantly updated.
Benjamin
Benjamin
This website helped me prepare for multiple certifications, and today I’m working in cybersecurity. Without their free resources, I wouldn’t be here.

Frequently Asked Question (FAQ's)

Have questions? You’re not alone. We’ve answered the most frequently asked questions to help you feel confident and informed every step of the way.
What is Prep2Certs?

Prep2Certsis a premium service offering a comprehensive collection of exam questions and answers for over 1400 certification exams. It is regularly updated and designed to help users pass their certification exams confidently.

Please contact info@Prep2Certs.com and we will provide you with alternative payment options.

You can by Contacting our sales team.

Free updates are available for the duration of your subscription, after the subscription is expired, your access will no longer be available.