0% found this document useful (0 votes)
78 views2 pages

Java Threads, Streams, and JavaFX Overview

Uploaded by

fokowe2429
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views2 pages

Java Threads, Streams, and JavaFX Overview

Uploaded by

fokowe2429
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1. What do you mean by threads in Java?

A thread in Java is the smallest unit of a program that can run independently. It enables multitasking by
allowing concurrent execution.

2. Difference between process and thread:

Process: Independent program with its own memory, heavyweight.

Thread: Sub-part of process sharing memory, lightweight.

3. What is stream?

A stream is a sequence of data supporting input and output operations.

4. Byte stream classes:

Input: FileInputStream, ByteArrayInputStream, FilterInputStream, BufferedInputStream,


DataInputStream.

Output: FileOutputStream, ByteArrayOutputStream, FilterOutputStream, BufferedOutputStream,


DataOutputStream.

5. Two common constructors of FileInputStream:

FileInputStream(String fileName)

FileInputStream(File file)

6. Need of Generic Programming:

Provides type safety, avoids ClassCastException, improves reusability and readability.

7. Features of JavaFX:

Rich UI controls, CSS support, FXML, 2D/3D graphics, animation, media support, hardware
acceleration.

8. Method to launch JavaFX application:

launch()

9. Event source object:


The component that generates an event and sends it to listeners.

10. Property binding in JavaFX:

A mechanism to automatically update one property when another changes.

You might also like