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.

HomeCertifications1Z0-829DomainsJava I/O API and Securing Applications
1Z0-829Free — No Signup

Java I/O API and Securing Applications

Practice 1Z0-829 Java I/O API and Securing Applications questions with full explanations on every answer.

81questions

Start practicing

Java I/O API and Securing Applications — choose a session length

10 questions~10 min20 questions~20 min30 questions~30 min50 questions~50 min

Free · No account required

1Z0-829 Domains

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 Java I/O API and Securing Applications questions

10Q20Q30Q50Q

All 1Z0-829 Java I/O API and Securing Applications questions (81)

Start session

Click any question to see the full explanation and answer options, or start a focused practice session above.

1

A developer is tasked with reading a large binary file (1 GB) from a network share using the least amount of memory possible. Which approach should be used?

2

A Java application writes sensitive user data to a file. To ensure that data is not left in the file system after the application crashes, which practice should be followed?

3

An application must read a configuration file that is updated frequently by another process. The developer wants to avoid stale data and minimize I/O operations. Which approach is best?

4

A developer needs to write text to a file with UTF-8 encoding. Which class should be used?

5

A Java application running in a secure environment needs to read a file located outside the application's directory. Which approach correctly handles security?

6

A developer is designing a service that processes multiple files concurrently. To avoid resource leaks, which practice is essential?

7

Which statement about java.io and java.nio.file packages is true?

8

A developer needs to copy a large directory tree from one location to another, preserving file attributes. Which method should be used?

9

Which TWO statements are true about securing a Java application?

10

Which THREE are valid ways to read the contents of a text file into a String in Java?

11

Which TWO are true about the try-with-resources statement?

12

Which THREE are benefits of using the NIO.2 API over the java.io API?

13

A financial trading application processes real-time stock data from multiple exchanges. The application reads large binary files (each up to 500 MB) containing trade records, processes them, and writes summary reports to a shared network drive. The development team observes that the application occasionally throws a java.io.IOException: 'The process cannot access the file because it is being used by another process' when writing reports. The application is multi-threaded, and each thread writes to a separate file in the same directory. The team also notices that the application slows down significantly when the network drive is under heavy load. The application runs on Windows servers with Java 17. The code uses FileOutputStream for writing and does not explicitly close streams in some paths. Which course of action should the team take to resolve the issues and improve performance?

14

A Java application reads configuration from a file using FileInputStream. The application must handle the case where the configuration file is missing by logging a warning and using default values. Which design approach best meets this requirement?

15

Which TWO statements about Java serialization are true?

16

You are developing a Java application that processes sensitive user data. The application runs on a server with strict security policies. You need to read configuration properties from a file located at /etc/app/config.properties. The application uses a SecurityManager. During testing, you get a security exception: java.security.AccessControlException: access denied (java.io.FilePermission /etc/app/config.properties read). You have already added a file permission grant in the policy file for the application codebase. However, the exception persists. What is the most likely cause?

17

Which TWO statements about java.io and java.nio.file packages are true?

18

What is the output?

19

A Java application running on a server reads configuration from a file 'config.properties' located in the same directory as the JAR. The application uses java.util.Properties.load(InputStream) to read the file. Recently, the file was modified by an unauthorized user, and the application started throwing runtime exceptions due to corrupted property values. The security team requires that the file be protected from unauthorized modifications while still being readable by the application. Which action should be taken to ensure the integrity of the configuration file?

20

Order the steps to create an immutable class in Java.

21

Match each concurrency utility to its purpose.

22

A developer needs to read all lines from a text file named "data.txt" that uses UTF-8 encoding. Which code correctly reads the file using the NIO.2 API?

23

A company uses serialization to transfer objects between microservices. To prevent deserialization attacks, they want to restrict which classes can be deserialized. Which approach should be used in Java 17?

24

Given a requirement to efficiently copy a large file (over 2 GB) from one path to another, which approach is most appropriate for Java NIO.2?

25

Which resource declaration order in try-with-resources is valid when both a FileInputStream and a BufferedInputStream wrapping it need to be closed automatically?

26

A developer wants to traverse a directory tree to find all files that are symbolic links. Which NIO.2 method should be used to follow symbolic links during traversal?

27

A developer needs to create a temporary file that will be automatically deleted when the JVM terminates. Which approach correctly achieves this?

28

A method receives an InputStream and needs to compute its MD5 hash while reading the data. Which approach is most efficient?

29

A Java application uses SecurityManager with a policy file. Which permission is required to allow the application to read all files in the /var/log directory, including subdirectories?

30

A serialized object has an explicitly declared serialVersionUID of 123L. After a code change, a new field is added to the class but the serialVersionUID is left unchanged. What happens when deserializing an old stream?

31

Which two of the following are valid methods to create a new directory using the NIO.2 Files class? (Select two.)

32

Which two statements are true about FileInputStream? (Select two.)

33

Which three actions help secure a Java application that uses serialization? (Select three.)

34

Refer to the exhibit. Assuming the application is running from /home/application/lib/myapp.jar, which of the following actions is allowed by the policy?

35

Refer to the exhibit. What is the most likely cause of this exception?

36

Refer to the exhibit. What is the purpose of this code?

37

A developer needs to read a very large text file (over 1 GB) efficiently with minimal memory overhead. Which approach is most suitable?

38

A class implements Serializable but the developer wants to completely prevent deserialization of its instances. Which approach accomplishes this?

39

Which class is best suited for reading integer tokens from a string containing space-separated integers?

40

A web server application writes access logs to a file. To ensure that log entries are written to disk immediately even if the JVM crashes, which approach is most appropriate?

41

A Java application needs to refer to a file using the path "data/input.txt". To ensure platform independence (correct file separator), which approach is recommended?

42

A developer wants to copy all files from one directory to another, preserving file attributes (e.g., last modified time, permissions). Which NIO.2 method is most appropriate?

43

Which interface is designed for recursively walking a file tree?

44

To generate a cryptographically secure random number for a key generation algorithm, which class should be used?

45

In a JAAS login module, after the login() method returns true, which method must be called to commit the authentication and add principals to the Subject?

46

Which TWO statements are true regarding reading files with the NIO.2 API?

47

Which THREE are recommended practices to prevent privilege escalation when using doPrivileged in a security-sensitive Java application?

48

Which TWO practices improve the security of Java serialization?

49

Refer to the exhibit. Which algorithm was used to generate the certificate fingerprint shown?

50

Refer to the exhibit. Which of the following best describes the effective permissions granted to the application?

51

Refer to the exhibit. What is the most likely cause of this exception?

52

A company needs to read a large text file (over 2 GB) line by line in a Java application while minimizing memory footprint. Which approach is most efficient?

53

An application deserializes objects from a network stream. To protect against deserialization attacks, which approach is most effective in Java 17?

54

Which of the following correctly uses try-with-resources to ensure a FileInputStream is closed after use?

55

Which TWO approaches are valid for writing text data to a file in Java? (Choose two.)

56

Which THREE statements about the SecurityManager and security policies in Java 17 are true? (Choose three.)

57

Which is the best practice for securing a Java application that reads sensitive configuration files?

58

Refer to the exhibit. A developer runs a keytool command and sees the output above. Which command produced this output?

59

Refer to the exhibit. A security policy file is configured as shown. The application in app.jar tries to read a file named "${user.home}/data/db.properties". What is the result?

60

A financial services company runs a Java 17 application on a server with 8 GB RAM. The application reads daily transaction files in CSV format (each file is about 500 MB). It processes each line, validates it against a SQL database, and writes results to an output file. Recently, after processing about 60% of a file, the application crashes with an OutOfMemoryError: Java heap space. The heap size is set to 2 GB. The code uses Files.readAllLines() to load the entire file into a List<String>, then iterates. The team is evaluating solutions to avoid memory issues. Which approach is the best course of action?

61

Which class from the java.nio.file package is most appropriate for efficiently transferring data between two channels on the same machine?

62

Which class provides a convenient means to read text from a file line by line?

63

A class implements Serializable. Which modification ensures that a specific field (password) is not included in the serialized stream?

64

Which TWO secure coding practices should be followed when developing a Java application that handles user input? (Choose two.)

65

A Java application uses FileChannel to copy a file to a remote network drive. The developer wants to ensure atomic file replacement on the destination. Which approach is correct?

66

Which interface should be implemented to create a custom filter for deserialization in Java?

67

A developer is writing a utility to copy a large binary file (e.g., 500 MB) from one location to another while minimizing memory overhead and ensuring data integrity. Which approach is most appropriate?

68

A financial application deserializes objects received over the network using ObjectInputStream. To prevent deserialization attacks, which secure coding practice should be implemented?

69

A web application allows users to specify filenames for uploaded documents. The application saves files to a directory using the provided name. Which secure programming practice should be applied to prevent path traversal attacks?

70

Which TWO approaches are recommended to secure Java I/O operations? (Choose two.)

71

Which THREE statements are true about Java NIO.2 and its interaction with blocking I/O? (Choose three.)

72

A large-scale data processing platform uses Java to read and write files across multiple nodes. Recently, operations have slowed down significantly. The system uses FileInputStream and FileOutputStream wrapped in BufferedInputStream and BufferedOutputStream with default buffer sizes (8 KB). The operations team suspects that the default buffer size is causing excessive system calls. The files are typically 100 MB to 1 GB in size. Which change would most improve I/O performance while minimizing memory overhead?

73

A developer is building a file synchronization tool that runs on multiple threads. Multiple threads may read and write to the same file concurrently. The developer wants to ensure that a thread does not read a file while another thread is writing to it, and that concurrent reads are allowed. Which locking mechanism should be used?

74

A web application allows users to upload profile pictures. The application saves the files to a directory using the original filename provided by the user. After a security review, the team discovered a critical path traversal vulnerability. Which remediation is most effective in preventing exploitation while maintaining usability?

75

A logging framework in Java has been writing logs to a file using a FileWriter with default buffer size. The logs are frequently lost when the application crashes because the buffer is not flushed. Which change ensures that log messages are written immediately without significantly impacting performance?

76

An architect is designing a microservice that reads large CSV files (up to 500 MB) from a shared filesystem and processes each row. The processing is CPU-bound and must not block the main thread. The service is deployed in a container with limited memory (512 MB heap). Which approach is most suitable?

77

A developer needs to read a large text file (several gigabytes) line by line as efficiently as possible, processing each line without loading the entire file into memory. Which approach should the developer use?

78

A class that stores sensitive user data implements Serializable. To minimize security exposure from deserialization attacks, which modification is the best practice?

79

Which TWO are secure coding practices for Java I/O that help prevent resource leaks and unauthorized access? (Choose two.)

80

Refer to the exhibit. A Java application is deployed in /opt/app/lib/ and attempts to perform the following operations: 1) Read the file /data/config/settings.xml 2) Write to the file /logs/app.log 3) Read the file /data/config/subdir/extra.conf Which statement is true?

81

A developer is building a batch processing application that reads a large CSV file (approx. 5 GB) from a network file system, transforms each row, and writes the result to a database. The initial implementation uses Files.lines(path) to obtain a Stream<String>, processes each line with forEach, and then does not explicitly close the stream. After running for several minutes, the application slows down, and eventually throws an IOException: 'Too many open files'. The database writes are also failing intermittently. The developer needs to fix the application. The environment is Java 17 on Linux with default settings. Which course of action best resolves the issues?

Practice all 81 Java I/O API and Securing Applications questions

Other 1Z0-829 exam domains

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 Packaging

Frequently asked questions

What does the Java I/O API and Securing Applications domain cover on the 1Z0-829 exam?

The Java I/O API and Securing Applications domain covers the key concepts tested in this area of the 1Z0-829 exam blueprint published by Oracle. Courseiva provides free domain-focused practice, mock exams, missed-question review, and readiness tracking across all 1Z0-829 domains — no account required.

How many Java I/O API and Securing Applications questions are in the 1Z0-829 question bank?

The Courseiva 1Z0-829 question bank contains 81 questions in the Java I/O API and Securing Applications domain. Click any question to see the full explanation and answer breakdown.

What is the best way to practice Java I/O API and Securing Applications for 1Z0-829?

Start with a 10-question focused session to identify your baseline accuracy in this domain. Read every explanation — even for questions you answer correctly — to understand the reasoning. Once you score consistently above 80%, move to a 20–30 question session to confirm depth before moving to the next domain.

Can I practice only Java I/O API and Securing Applications questions for 1Z0-829?

Yes — the session launcher on this page draws questions exclusively from the Java I/O API and Securing Applications domain. Choose 10, 20, 30, or 50 questions for a focused session, or click individual questions to review them one by one.

Free forever · No credit card required

Track your 1Z0-829 domain progress

Save your results, see per-domain analytics, and get readiness scores — free, for every certification.

Sign Up Free

Free forever · Every certification included

Practice Session

10 questions20 questions30 questions50 questions

Study Resources

All DomainsPractice TestMock ExamFlashcardsStudy Guide