1Z0-829 · topic practice

Handling Date, Time, Text, Numeric and Boolean Values practice questions

Practise Oracle Certified Professional Java SE 17 Developer 1Z0-829 Handling Date, Time, Text, Numeric and Boolean Values practice questions — original exam-style scenarios with answer choices, explanations, and analysis of common mistakes.

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Reviewed byJohnson Ajibi· MSc IT Security
19 questionsDomain: Handling Date, Time, Text, Numeric and Boolean Values

What the exam tests

What to know about Handling Date, Time, Text, Numeric and Boolean Values

Handling Date, Time, Text, Numeric and Boolean Values questions test whether you can apply the concept in context, not just recognise a definition.

How the topic appears in realistic exam-style scenarios.

Which detail in the question changes the correct answer.

How to eliminate plausible but wrong options.

How to connect the question back to the wider exam objective.

Watch out for

Common Handling Date, Time, Text, Numeric and Boolean Values exam traps

  • Answering from memory before reading the full scenario.
  • Missing a constraint such as cost, availability, security, scope or command context.
  • Choosing a broad answer when the question asks for the most specific fix.
  • Ignoring why the wrong options are tempting.

Practice set

Handling Date, Time, Text, Numeric and Boolean Values questions

19 questions · select your answer, then reveal the 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?

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?

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

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

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

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

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

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);

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));

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?

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?

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

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

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

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

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

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

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused Handling Date, Time, Text, Numeric and Boolean Values sessions

Start a Handling Date, Time, Text, Numeric and Boolean Values only practice session

Every question in these sessions is drawn from the Handling Date, Time, Text, Numeric and Boolean Values domain — nothing else.

Related practice questions

Related 1Z0-829 topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the 1Z0-829 exam test about Handling Date, Time, Text, Numeric and Boolean Values?
Handling Date, Time, Text, Numeric and Boolean Values questions test whether you can apply the concept in context, not just recognise a definition.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just Handling Date, Time, Text, Numeric and Boolean Values questions in a focused session?
Yes — the session launcher on this page draws every question from the Handling Date, Time, Text, Numeric and Boolean Values domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other 1Z0-829 topics?
Use the topic links above to move to related areas, or go back to the 1Z0-829 question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the 1Z0-829 exam covers. They are not copied from any real exam or dump site.