Courseiva
Knowledge + Practice
CertificationsVendorsCareer RoadmapsLabs & ToolsStudy GuidesGlossaryPractice Questions
C
Courseiva

Free IT certification practice questions with explained answers for CCNA, CompTIA, AWS, Azure, Google Cloud, and more.

Certification Practice Questions

CCNA practice questionsSecurity+ SY0-701 practice questionsAWS SAA-C03 practice questionsAZ-104 practice questionsAZ-900 practice questionsCLF-C02 practice questionsA+ Core 1 practice questionsGoogle Cloud ACE practice questionsCySA+ CS0-003 practice questionsNetwork+ N10-009 practice questions
View all certifications →

Product

CertificationsCertification PathsExam TopicsPractice TestsExam Dumps vs Practice TestsStudy HubComparisons

Company

AboutContactEditorial PolicyQuestion Writing PolicyTrust Center

Legal

Privacy PolicyTerms of Service

Courseiva is a free IT certification practice platform offering original exam-style practice questions, detailed explanations, topic-based practice, mock exams, readiness tracking, and study analytics for Cisco, CompTIA, Microsoft, AWS, and other technology certifications.

© 2026 Courseiva. Courseiva is operated by JTNetSolutions Ltd. All rights reserved.

Courseiva is an independent certification practice platform and is not affiliated with, endorsed by, or sponsored by Cisco, Microsoft, AWS, CompTIA, Google, ISC2, ISACA, or any other certification vendor. Vendor names and certification marks are used only to identify the exams learners are preparing for.

← Handling Date, Time, Text, Numeric and Boolean Values practice sets

1Z0-829 Handling Date, Time, Text, Numeric and Boolean Values • Complete Question Bank

1Z0-829 Handling Date, Time, Text, Numeric and Boolean Values — All Questions With Answers

Complete 1Z0-829 Handling Date, Time, Text, Numeric and Boolean Values question bank — all 0 questions with answers and detailed explanations.

34
Questions
Free
No signup
Certifications/1Z0-829/Practice Test/Handling Date, Time, Text, Numeric and Boolean Values/All Questions
Question 1mediummultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

A developer is writing a method that takes a LocalDate and a ZoneId and returns the current time in that time zone as an OffsetDateTime. Which approach correctly implements this?

Question 2easymultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Which of the following correctly formats a NumberFormat instance to display a currency value for the US locale with exactly two decimal places, rounding half-up?

Question 3hardmultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

A developer needs to parse the string "2023-12-31T23:59:60Z" (a leap second) into a java.time.Instant. Which statement is true?

Question 4easymultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

A method receives a Boolean reference and must set it to false if null. Which code accomplishes this correctly?

Question 5mediummultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Which of the following correctly uses DateTimeFormatter to parse the date "2023-01-15" into a LocalDate?

Question 6hardmulti select
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Which TWO statements are true about the java.time.Duration class? (Choose two.)

Question 7mediummulti select
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Which THREE statements are true about the Boolean class? (Choose three.)

Question 8hardmultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Given the exhibit, what is the output? (Assume America/New_York observes daylight saving time, with spring forward on March 12, 2023 at 2:00 AM to 3:00 AM.)

Exhibit

Refer to the exhibit.

DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
ZonedDateTime zdt = ZonedDateTime.parse("2023-03-12 02:30:00 America/New_York", formatter);
System.out.println(zdt);
Question 9mediummultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Given the exhibit, what is the output?

Exhibit

Refer to the exhibit.

Locale locale = new Locale("en", "US");
NumberFormat nf = NumberFormat.getPercentInstance(locale);
nf.setMinimumFractionDigits(2);
System.out.println(nf.format(0.125));
Question 10hardmultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

A company's Java application processes time-sensitive data from IoT sensors. The system must handle timestamps across multiple time zones. The application runs on a server set to UTC. Developers have been using java.util.Date and SimpleDateFormat for date parsing. Recently, there have been intermittent failures where timestamps from sensors in the America/New_York time zone are parsed incorrectly around daylight saving time transitions. Specifically, during the spring forward (March 12, 2023, at 2:00 AM EST to 3:00 AM EDT), timestamps like "2023-03-12 02:30:00" are being interpreted as times that do not exist, causing DateTimeParseException. The team decides to migrate to the java.time API. They need to parse sensor timestamps that include a time zone offset (e.g., "2023-03-12 02:30:00 -05:00") into an OffsetDateTime. Which course of action correctly parses the timestamp and handles the DST issue?

Question 11easymulti select
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Which TWO of the following are valid ways to create a LocalDate object in Java 17?

Question 12hardmultiple choice
Read the full NAT/PAT explanation →

A financial application uses Java SE 17 with a custom date format. The requirement is to parse strings like "2023-12-31T23:59:59.999Z" into an Instant. The existing code uses SimpleDateFormat with pattern "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" and then calls parse(). It works fine in single-threaded testing, but in production under load, intermittent parsing failures occur with DateTimeParseException or wrong values. The application is multi-threaded and reuses the same formatter instance. Which single change should be made to fix the issue while maintaining performance?

Question 13mediumdrag order
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Arrange the steps to create a custom exception class in Java in the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5
Question 14mediumdrag order
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Arrange the steps to use a lambda expression to sort a list of strings by length.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5
Question 15mediummatching
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Match each Java keyword to its primary purpose.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Prevents serialization of a field

Ensures visibility of changes across threads

Controls access to a block or method by threads

Ensures consistent floating-point behavior across platforms

Indicates a method is implemented in platform-dependent code

Question 16mediummatching
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Match each annotation to its retention policy.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

SOURCE

RUNTIME

SOURCE

RUNTIME

RUNTIME

Question 17easymultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

A developer needs to parse a date string '2024-07-04' into a LocalDate object. Which approach is correct?

Question 18easymultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Which method checks if a String is empty or contains only whitespace?

Question 19easymultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Which of the following correctly creates a text block in Java?

Question 20mediummultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

A financial application uses BigDecimal for monetary calculations. Which rounding mode should be used to round to the nearest neighbor, and if both neighbors are equidistant, round to the even neighbor?

Question 21mediummultiple choice
Read the full NAT/PAT explanation →

Which of the following correctly formats a LocalDateTime object into a string with pattern 'dd/MM/yyyy HH:mm:ss'?

Question 22mediummultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

A program reads user input as a string and needs to parse it into an integer, handling invalid input gracefully. Which code snippet correctly uses try-catch to parse and prints the result or 'Invalid number'?

Question 23hardmultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Given: ZonedDateTime zdt = ZonedDateTime.of(2024, 3, 10, 2, 30, 0, 0, ZoneId.of("America/New_York")); In the US, on March 10, 2024, clocks spring forward at 2:00 AM to 3:00 AM. What is the output of System.out.println(zdt);?

Question 24hardmultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Which code correctly reads a line of text from the console using System.console()?

Question 25hardmultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

What is the result of executing the following code snippet?

BigDecimal d1 = new BigDecimal("1.00"); BigDecimal d2 = new BigDecimal("1.0"); System.out.println(d1.equals(d2));

Question 26easymulti select
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Which three of the following are valid methods in the String class in Java 17? (Choose three.)

Question 27mediummulti select
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Which two statements about the java.time.Duration class are true? (Choose two.)

Question 28hardmulti select
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Which two of the following are valid ways to create a LocalDate representing the current date in the system's default timezone? (Choose two.)

Question 29easymultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Refer to the exhibit. What is the output?

Exhibit

Boolean b1 = Boolean.valueOf("true");
Boolean b2 = Boolean.valueOf("True");
System.out.println(b1 == b2);
Question 30mediummultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Refer to the exhibit. Which concept does this error relate to?

Exhibit

Error: java.time.format.DateTimeParseException: Text '2024-06-30T23:59:60' could not be parsed: Invalid value for SecondOfMinute (valid values 0 - 59): 60
Question 31hardmultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Refer to the exhibit. Which Java code correctly performs the equivalent timezone conversion?

Exhibit

SELECT FROM_TZ(TIMESTAMP '2024-03-10 02:30:00', 'America/New_York') AT TIME ZONE 'UTC' FROM DUAL;

Output: 10-MAR-24 07.30.00.000000 UTC
Question 32easymulti select
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

Which TWO statements correctly use the DateTimeFormatter class? (Choose two.)

Question 33mediummultiple choice
Read the full Handling Date, Time, Text, Numeric and Boolean Values explanation →

What is the output of the code in the exhibit?

Exhibit

Refer to the exhibit.

Exhibit:
```
NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.GERMANY);
double value = 1234.5678;
System.out.println(nf.format(value));
```
Question 34hardmultiple choice
Read the full NAT/PAT explanation →

A financial application processes a large log file containing millions of timestamp entries in two different formats: "2024-01-15T10:30:00Z" (ISO 8601) and "01/15/2024 10:30:00 AM" (US locale). The current implementation uses a single DateTimeFormatter with a pattern that throws an exception for the other format. The team wants to parse both formats efficiently without using try-catch for each line. Performance is critical, and the code must be thread-safe. Which approach should be used?

Practice tests

Scored 10-question sessions with instant feedback and explanations.

1Z0-829 Practice Test 1 — 10 Questions→1Z0-829 Practice Test 2 — 10 Questions→1Z0-829 Practice Test 3 — 10 Questions→1Z0-829 Practice Test 4 — 10 Questions→1Z0-829 Practice Test 5 — 10 Questions→1Z0-829 Practice Exam 1 — 20 Questions→1Z0-829 Practice Exam 2 — 20 Questions→1Z0-829 Practice Exam 3 — 20 Questions→1Z0-829 Practice Exam 4 — 20 Questions→Free 1Z0-829 Practice Test 1 — 30 Questions→Free 1Z0-829 Practice Test 2 — 30 Questions→Free 1Z0-829 Practice Test 3 — 30 Questions→1Z0-829 Practice Questions 1 — 50 Questions→1Z0-829 Practice Questions 2 — 50 Questions→1Z0-829 Exam Simulation 1 — 100 Questions→

Practice by domain

Each domain maps to a weighted exam section. Focus on the domain where you are weakest.

Handling Date, Time, Text, Numeric and Boolean ValuesControlling Program FlowUtilizing Java Object-Oriented ApproachHandling ExceptionsWorking with Arrays and CollectionsWorking with Streams and Lambda ExpressionsJava Platform Overview and PackagingJava I/O API and Securing Applications

Practice by scenario

Filter questions by type — troubleshooting, exhibit, drag-and-drop, PBQ, ACLs, OSPF, and more.

Browse scenarios→

Continue studying

All Handling Date, Time, Text, Numeric and Boolean Values setsAll Handling Date, Time, Text, Numeric and Boolean Values questions1Z0-829 Practice Hub