
Explore a broad introduction to advanced Java topics, from generic programming and collections to JDBC with MySQL, GUI Swing, network programming, and multi-threading, I/O, and basic graphics.
Explore generic programming by deferring data type specification with a type placeholder. Create a simple generic list with a data store array, size, and current position.
Learn to build a generic list class in Java that supports multiple data types with a generic add method and a toString display using a T placeholder.
Explore creating a generic interface and implementing it with type parameters, including a list interface and concrete string list, to build a reusable, type-safe collection framework.
Define a generic method inside a static class with its own type parameter to display elements of any array type, such as names or integers.
Define a generic pair class with two type parameters to store a first and second item, demonstrated with string and integer, illustrating how generics underpin maps and key-value relationships.
Build and use a generic Node class to store data and a next reference, then assemble a primitive linked list to illustrate generics in Java.
Explore sequential collections in Java by examining the collection, list, and set interfaces and their common methods such as add, remove, clear, size, toArray, and iterator. Prepare for upcoming interfaces.
Examine the queue and deck interfaces, learning how queues insert at the back and remove from the front with methods like offer, poll, and remove; compare with double ended queues.
Explore Java array lists, a dynamic alternative to arrays that grow and shrink. Declare, add, and access elements with get; iterate with for or foreach; resize with remove or add.
Learn to use the hash set class to store a collection of names, add and remove items, check contains, and iterate with a for-each loop, while inspecting size.
Explore how the tree set class stores elements in their natural sorted order, unlike hash set, and use size, contains, clear, first, last, lower, and after for ordered access.
Examine the priority queue class, which stores data in natural order and supports add, poll, remove, and peak operations to manage a line of items.
Split the Alice in Wonderland paragraph into an array, add words to a TreeSet to obtain unique words, then display 698 total and 88 unique words.
Create a simple square dance simulation by reading dancer names and sexes, sorting them into men and women priority queues, and pairing dancers until queues exhaust.
Explore associative collections with the map interface, where a key retrieves a value, such as a name to a phone number. Learn core methods like put, get, remove.
Explore the TreeMap class in Java to store a phone book of names and numbers. Use put, get, size, and remove to manage key-value pairs.
learn to use the hash map class to store key-value pairs, note that order isn't guaranteed (unlike tree map), and manage retrieval, size, and removal with a grades example.
Develop a word count tool by splitting a quote with punctuation removed into words, sorting them, and using a tree map to tally and display each word's frequency.
Explore the stack data structure in Java, using the Stack class and learning push, pop, and peek operations with LIFO behavior, including empty checks and practical usage.
Master queue concepts in advanced java programming by implementing a queue with the linked list class, performing add last, remove first, size, and isEmpty operations, and displaying results.
Explore binary search trees, a binary tree data structure, by building a node class with data, left, and right references, and implementing insertion and min/max value concepts in Java.
Convert a decimal number to binary using a stack: push the result of number modulus base 2, divide the number by base, and pop bits to form the binary string.
Distribute numbers into an array of queues by digit value, then collect them in order to produce a sorted array using queue-based distribution and collection.
Explore in order and pre order traversals of a binary search tree, note post order is less useful, and generate a node list while preparing min and max methods.
Learn to locate the minimum and maximum values in a binary search tree by traversing left for the min and right for the max, starting at the root.
Explore insertion sort, a simple, intuitive sorting algorithm. Implement it in Java by sorting an array of random numbers and displaying the results; note its inefficiency for large data sets.
Observe bubble sort's adjacent swaps that move smaller values forward and larger ones back, implemented in Java with nested loops, noting its inefficiency for large data sets.
Master the merge sort algorithm by splitting the array into halves, comparing adjacent elements, and merging into a final sorted order, with a two-method implementation and a temporary array.
Learn the quicksort algorithm, a divide-and-conquer sorting method that uses a pivot to partition data. Observe swaps and recursion on subarrays, and note that libraries implement quicksort for large data sets.
Apply a simple linear search to find the minimum value in an array by scanning elements sequentially, then compare its efficiency with binary search in sorted data.
Implement binary search on a sorted array, returning the index or -1 when not found, using a while loop with midpoint calculations to adjust bounds.
Compare bubble sort and quick sort timing using nano time on random arrays, observe quicksort's speed, and explore insertion sort plus the next linear vs binary search exercise.
Compare linear and binary search performance on large datasets by timing unsorted versus sorted arrays, using an array list to avoid duplicates, and highlight when binary search outperforms linear search.
Explore how runtime exceptions arise in Java, such as divide by zero and out-of-bounds access, and learn to handle them with try-catch to prevent crashes.
Learn how to handle exceptions in advanced Java programming with try catch blocks, catching arithmetic exceptions like can't divide by zero, and cleaning up to prevent crashes.
Continue exploring try-catch by building a program that displays a file's contents from the command line and handles file-not-found exceptions with clear messages.
Modify the Java program to read file contents into a data variable and print it. Add a catch for IOException and note that multiple catch clauses cover different exceptions.
Explore how the try-catch-finally construct ensures resource cleanup by executing the finally block regardless of exceptions. Learn to close files and databases safely to prevent resource leaks.
Add exception handling to a list class by throwing a custom list empty exception when the list is empty, then catch it and display a stack trace for debugging.
Install MySQL on Windows by downloading the 64-bit installer, running the setup with defaults, configuring and remembering the root password and port, and noting the program files location after installation.
Install the MySQL community server on Mac OS by downloading from mysql.com, selecting the 64-bit Mac OS 10 version, and verifying the server runs from a terminal at /usr/local/mysql.
Discover how to download and install the MySQL Connector/J driver, extract the jar, place it in the correct Java path, and run a test program to verify a JDBC connection.
Learn to connect a java program to a database using jdbc, establish a connection, handle exceptions, and ensure the connection is closed, setting up for querying data.
Learn how to query data in Java by executing a simple sql select from a films table, iterate results with a statement and result set, and display the data.
Drop the table if it exists, then create a books table with ISBN (char(10)), title (char(50)), author (char(50)), and publisher (char(50)). Compile and run the code to execute the update and finalize the table creation.
Learn to insert data into a books table using execute update, specifying isbn, title, author, and publisher; add multiple rows and handle record added or error inserting record messages.
Learn to update a database record by prompting for ISBN, field, and new data, build an update string, and execute the update in Java using a buffered reader.
Update a database in Java using JDBC prepared statements with placeholders for title and ISBN. Bind data with setString and executeUpdate to apply changes more reliably than string concatenation.
Explore network programming in Java by using net and io libraries to connect to a web site, create a URL, open a connection, and read and display its content.
Create a simple client socket to connect to a whois server on port 43, send a domain query, read the response via input and output streams, and close the socket.
Develop an echo server and client in Java to demonstrate TCP/IP network programming, using a server socket on port 10007, with accept, input handling, and clean shutdown.
Create an echo client to work with the ECOs servant from the last lesson. Test the client and server by running them to verify their communication.
Set up a simple two-way chat using a server and a client over TCP sockets, exchanging messages via input/output streams and a loop that ends on by.
Learn to build a simple Swing hello world GUI by creating a frame and label, setting size and close behavior, and displaying the interface.
Explore building a Java GUI with text fields using swing, including JTextField and JLabel, wiring an action listener to copy entered text into the label via a flow layout.
Add a JButton with an action listener to move text from text field to label, and place it between field and label using flow layout in 200 150 frame.
Learn how to create a Swing JList, populate it from an array, enable single selection, and display the chosen item in a label with a list selection listener.
learn to add a scroll pane to a list in a swing application, making the list scrollable and saving space by setting size with setPreferredSize and adding to the frame.
Develop a simple Java Swing GUI for Celsius–to–Fahrenheit conversions using a grid layout, featuring labels, a text field, a scale list, and a convert button.
An Advanced Java Tutorial aimed towards the Developer Who Already has Learned the Fundamentals of Java Programming.
In this Advanced Java Programming training course, expert content provider Infinite Skills builds on the beginners Java course, and goes deeper into programming topics that help you to understand these more advanced Java concepts. Designed for the more experienced Java developer, you should have a good working knowledge of the Java programming language before going through this tutorial.
Some of the advanced topics that you will cover in this Advanced Java Tutorialincludes; generic programming, sequential and associative data structures, classic data structures, sorting and searching, exception handling, database programming with JDBC, networking programming GUI development using Swing and an overview of Multithreading. You will also explore Java Applets, web applications (Servlets), advanced input and output classes, more advanced strings, regular expressions, Java graphics, and finally, closing off with a look at using Eclipse.
By the conclusion of this training course, you will have a clear understanding of each of the topics of Advanced Java Programming, which will allow you to go more in-depth with the concepts of your choice. Working files are included to allow you to learn the concepts using the same files that the author does throughout this computer based training course.