0% found this document useful (0 votes)
3 views

Java_Advanced_Topics_Summary

The document summarizes advanced Java topics including I/O streams, JDBC, networking, threading, RMI, and collections. It highlights key differences between various classes and interfaces, such as Byte vs Character streams, Statement vs PreparedStatement, and ArrayList vs LinkedList. Additionally, it covers concepts like synchronization, inter-thread communication, and JNI integration.

Uploaded by

nishcheymanuja98
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)
3 views

Java_Advanced_Topics_Summary

The document summarizes advanced Java topics including I/O streams, JDBC, networking, threading, RMI, and collections. It highlights key differences between various classes and interfaces, such as Byte vs Character streams, Statement vs PreparedStatement, and ArrayList vs LinkedList. Additionally, it covers concepts like synchronization, inter-thread communication, and JNI integration.

Uploaded by

nishcheymanuja98
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
You are on page 1/ 2

Java Advanced Topics Summary Sheet

1. Byte vs Character Streams: Byte streams (InputStream/OutputStream) handle binary data; Character

streams (Reader/Writer) handle text.

2. BufferedReader/Writer: Used for efficient I/O. BufferedReader reads lines; BufferedWriter writes with

buffering.

3. Serialization: Converts objects into byte stream using Serializable. Use ObjectOutputStream/InputStream.

4. File Copy Example: Use FileInputStream and FileOutputStream with buffer.

5. RandomAccessFile: Allows reading/writing at a specific file location.

6. JDBC Steps: Load driver, connect DB, create statement, execute query, close connection.

7. Statement vs PreparedStatement: PreparedStatement is precompiled and safer against SQL injection.

8. JDBC Insert: Use PreparedStatement to insert data into DB.

9. SQL Exception Handling: Use try-catch blocks and SQLException methods.

10. JDBC vs ODBC: JDBC is platform-independent and Java-specific; ODBC is native and not Java-specific.

11. TCP vs UDP: TCP is reliable/connection-based; UDP is fast/connectionless.

12. Client-Server Sockets: Use Socket (client) and ServerSocket (server).

13. ServerSocket/Socket: ServerSocket listens for clients; Socket connects and communicates.

14. Data Transmission: Via streams using read()/write() or buffered readers/writers.

15. Thread vs Runnable: Runnable is better for flexibility and multiple threads.

16. Synchronization: Prevents race conditions using synchronized blocks/methods.

17. Inter-thread Communication: Uses wait(), notify(), notifyAll().

18. Thread Lifecycle: New -> Runnable -> Running -> Waiting/Blocked -> Terminated.

19. RMI Architecture: Includes stub, skeleton, remote interface, and registry.

20. RMI Steps: Define interface, implement it, register object, and create client.

21. Remote vs Serializable: Remote is for remote method calls; Serializable is for object transport.

22. RMI Security: Use security manager and policy files.

23. JNI: Connects Java with C/C++ for native code execution.

24. JNI Integration: Write Java + native method, generate header, implement in C, compile.

25. JNI Pros/Cons: Access to native libraries but reduced portability and safety.

26. ArrayList vs LinkedList: ArrayList is fast for access; LinkedList is better for insertion/deletion.
27. HashMap vs Hashtable: HashMap is faster; Hashtable is thread-safe.

28. Iterator/ListIterator: Used to traverse collections; ListIterator supports reverse.

29. Set vs List: Set has no duplicates; List maintains order and allows duplicates.

30. Thread-Safe Collections: Use ConcurrentHashMap, synchronized wrappers, CopyOnWriteArrayList, etc.

You might also like