Java for Complete Beginners (Video), Part 43: Inner (Nested) Classes

Java lets you declare classes almost anywhere, even inside other classes and methods. In this tutorial we’ll take a look at some of the possibilities and why you might want to make use of them. In particular, we’ll look at … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , , |

Quantifiers – Greedy and Non-Greedy: Learn Perl By Doing It, Part 9

Quantifiers in regular expressions let you specify how many characters you want to match. You can use quantifiers to specify exact numbers of characters, but the most important distinction is between greed and non-greedy quantifiers. Learn Perl By Doing It … Continue reading

Posted in Learn Perl By Doing It, Perl | Tagged , , , , , |

Groups in Regular Expressions: Learn Perl By Doing It, Part 8

Groups in regular expressions allow you to pick out particular parts of the data you’re matching that you can then refer to again later. For example, you can extract just a machine ID from a complex machine specification text, or … Continue reading

Posted in Learn Perl By Doing It, Perl | Tagged , , , , , |

Wildcards in Regular Expressions: Learn Perl By Doing It, Part 7

You can use wildcards in your Perl regular expressions to match multiple characters. Wildcards enable you to match any character, or to match any of some subset of possible characters. In this tutorial we’ll look at the dot wildcard, which … Continue reading

Posted in Learn Perl By Doing It, Perl | Tagged , , , , |

Writing Files and Replacing Text: Learn Perl By Doing It, Part 6

How to write and create files in Perl, and how to do a find-and-replace using regular expressions. Once we know how to read files and how to write files, we can read in one file, replace or correct text in … Continue reading

Posted in Learn Perl By Doing It, Perl | Tagged , , , , |

Java for Complete Beginners (Video), Part 42: Equals and Comparing Strings

This is a tutorial on the vital .equals() method in Java, used for comparing the meaning of objects to find out whether they are equal or not. .equals() is vital in comparing Strings and Doubles; beginners often mistakenly use == … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , , |

Reading Files and Beginning Regular Expressions: Learn Perl By Doing It, Part 5

How to read files in Perl, and also the start of an introduction to regular expressions. Regular expressions can be used in pretty much every programming language these days, and stuff you learn about “regex” in Perl will also work, … Continue reading

Posted in Learn Perl By Doing It, Perl | Tagged , , , , |

Arrays and Checking if Files Exist: Learn Perl By Doing It, Part 4

A tutorial on using arrays in Perl and checking if files exist. Perl is totally excellent for doing stuff involving large numbers of files. Once you know Perl, you’ll never need to sit there renaming or moving large numbers of … Continue reading

Posted in Learn Perl By Doing It, Perl | Tagged , , , , |

Downloading Text and Images: Learn Perl By Doing It, Part 3

How to download text and images with just a few lines of Perl. Learn Perl By Doing It Get the complete course here Includes 11 completely free videos – no subscription necessary. use strict; use warnings; use LWP::Simple; sub main … Continue reading

Posted in Learn Perl By Doing It, Perl | Tagged , , , , |

Java for Complete Beginners (Video), Part 41: Writing Text Files

A tutorial on writing text files, Java 7 style. If you want Java 6 style, you can easily take the code here and re-arrange it along the lines of the previous tutorial on reading text files in Java. Writing text … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , , , , |

Java for Complete Beginners (Video), Part 40: Try With Resources

Java 7 introduces a great new language feature, “try with resources”. In this tutorial we’ll see how we can use a try block to simply our file reading code quite a lot, ensuring that file handles are closed without the … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , , , , |

Java for Complete Beginners (Video), Part 39: Reading Files with FileReader

The most flexible way to read files in Java involves using a sort of Russian doll system of objects; in this tutorial we’ll look at reading text files using such a method. Unfortunately prior to Java 7 we end up … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , , |

Hello World: Learn Perl By Doing It, Part 2

A tutorial on a basic “Hello World” program in Perl, including some highly useful stuff that should be part of every self-respecting Perl program. Learn Perl By Doing It Get the complete course here Includes 11 completely free videos – … Continue reading

Posted in Learn Perl By Doing It, Perl | Tagged , , , , |

Installation and Editors: Learn Perl By Doing It, Part 1

The first in a series of tutorial on learning Perl. The approach I take in this course is to try to show you Perl that you can actually use, concentrating as much as possible on analysing real Perl scripts rather … Continue reading

Posted in Learn Perl By Doing It, Perl | Tagged , , , , |

Debugging in Eclipse: Java for Complete Beginners

A video on how to use the debugger in Eclipse. Debugging is something that a lot of developers happily get by without, but it’s something that’s sometimes very useful, and it’s certainly something that every aspiring developer should learn. Debuggers … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , |

Java for Complete Beginners (Video), Part 38: Abstract Classes

Abstract classes allow you to define the parent class of a new hierarchy without having to worry about the user actually instantiating the parent. For instance you could create an “Animal” class just to act as the basis for “Dog”, … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , , |

Java for Complete Beginners (Video), Part 37: Runtime Exceptions

Runtime exceptions are a kind of exception that you’re not forced to handle. They usually point to serious problems with your code, indicating that you need to revise it. The infamous null pointer exception and array out-of-bounds exception are good … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , , |

Java for Complete Beginners (Video), Part 36: Multiple Exceptions

In this tutorial we’ll take a look at throwing and handling multiple exceptions, plus a look at a popular exam/interview question. Java 7 introduced a new way of handling multiple exceptions; but even if you’re still on Java 6, there … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , |

Java for Complete Beginners (Video), Part 35: Throwing Exceptions

In this tutorial we’ll take a look at how to throw your own exceptions in Java. Throwing an exception is a useful thing to do when your method encounters an unexpected error; the exception will immediately return from your method, … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , |

Ten Tips to Make You a Better Programmer

In this video I’ll count down my top ten tips for improving your coding. Professionals will know these tips already (or should do), but beginners often ignore them, accidentally wasting a lot of time in the process. If you follow … Continue reading

Posted in Java | Tagged , , , , , |

Creating Product Boxes with Inkscape and Box Shot 3D

Box Shot 3D lets you create raytraced product boxes, DVD packs, mugs, leaflets and lots more. The idea is, you supply your own images, incorporating your own logos and text, then Box Shot 3D renders them into a realistic-looking image … Continue reading

Posted in graphics | Tagged , , , |

Java for Complete Beginners (Video), Part 34: Handling Exceptions

Exceptions are a major part of the Java language; so much so that you can’t write very much code without at least having to handle some of them. In this tutorial we’ll get started with Exceptions, and I’ll also give … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , |

Deciding Which Collection to Use: Java Collections Framework Video Tutorial, Part 12

How to decide which collection to use. Not only is this the first thing anyone needs to know when they’re planning to use a Java Collections class, but it’s also a favourite question of interviewers and examiners (although quite not … Continue reading

Posted in Java, Java Collections Framework | Tagged , , , , , , |

Java Multithreading: Swing and SwingWorker (Video Tutorial Part 15)

If you’re doing Swing (GUI) programming in Java, you might want to consider using the SwingWorker class for your multithreading needs. SwingWorker is a ferocious-looking but useful class that’s perfect for running stuff in the background while simultaneously updating progress … Continue reading

Posted in Java, Java Multithreading, Java Video Tutorials (Advanced) | Tagged , , , , , , , |

Implementing Iterable; Downloading HTML Using Java: Java Collections Framework Video Tutorial, Part 11

How and why to implement Iterable and Iterator in Java, with an example of downloading HTML in Java while iterating through a “for-each” loop. After starting the video, click the maximise button to make it fullscreen so you can see … Continue reading

Posted in Java, Java Collections Framework | Tagged , , , , , , |

Using Iterators: Java Collections Framework Video Tutorial, Part 10

A look at using iterators in Java; how “for each” loops work and how to add or remove elements from a list while iterating through it. After starting the video, click the maximise button to make it fullscreen so you … Continue reading

Posted in Java, Java Collections Framework | Tagged , , , , , , , |

Java for Complete Beginners (Video), Part 33: Reading Files

You can use the Scanner class to simplify reading text files quite a bit. In this tutorial we’ll see how to do it, and I’ll also explain how to locate your file on the disk and we’ll look at a … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , |

Queues: Java Collections Framework Video Tutorial, Part 9

A tutorial on the Java Queue interface, plus a couple of examples of Queues and a bit about the highly-useful (if you’re into multithreading) BlockingQueue interface. After starting the video, click the maximise button to make it fullscreen so you … Continue reading

Posted in Java, Java Collections Framework | Tagged , , , , , , |

Servlets and JSPs: Part 3 – A “Hello World” Servlet

Learn Java web programming Discover how to create a basic Java servlet with this, the third part in the series on Java web programming from Cave of Programming. Java servlets are the basic building blocks of Java-powered websites, and it’s … Continue reading

Posted in Servlets and JSPs | Tagged , , , , , |

JSP and Servlet Tutorial: Learn Java Web Programming

Welcome to the Java web programming tutorial series from Cave of Programming! You can find the complete course here at Udemy.com At the above link you can find seven completely free videos and a 30% discount on the full course. … Continue reading

Posted in Java, Mastering Java Swing, Complete Course | Tagged , , , , , , |

Java for Complete Beginners (Video), Part 32: Anonymous Classes

Anonymous classes in Java are a handy way of creating “one off” objects using un-named classes that you create on the fly. We’ll take a look at how to create them in this tutorial. When the video is running, click … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , |

Mastering Java Swing:Custom Components, Part 5

This is the fifth video in a complete course on desktop and browser-based programming in Java. The complete course covers almost every major topic in Swing programming, including desktop applications, databases and animation. Get two more free videos plus a … Continue reading

Posted in Mastering Java Swing, Complete Course | Tagged , , , , , |

Mastering Java Swing: Responding to Button Clicks, Part 4

This is the fourth video in a complete course on desktop and browser-based programming in Java. The complete course covers almost every major topic in Swing programming, including desktop applications, databases and animation. Get two more free videos plus a … Continue reading

Posted in Mastering Java Swing, Complete Course | Tagged , , , , , , |

Java for Complete Beginners (Video), Part 31: Generics and Wildcards

A tutorial on using wildcards with generic classes in Java. Want to impress even hardened Java developers with the depth of your Java knowledge? This should do the trick. Wildcards are mostly useful when you want to pass parametrized classes … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , , |

Mastering Java Swing: Adding Components, Part 3

This is the third video in a complete course on desktop and browser-based programming in Java. The complete course covers almost every major topic in Swing programming, including desktop applications, databases and animation. Get two more free videos plus a … Continue reading

Posted in Mastering Java Swing, Complete Course | Tagged , , , , , |

Java for Complete Beginners (Video), Part 30: Using Generics

This tutorial is on generics; a system for creating “parametrized” classes that allow classes to work with other objects, the type of which you can specify when you instantiate (create objects from) the class. Confused? Hopefully this gentle introduction will … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , |

Mastering Java Swing: Hello World, Part 2

This is the second video in a complete course on desktop and browser-based programming in Java. The complete course covers almost every major topic in Swing programming, including desktop applications, databases and animation. Get two more free videos plus a … Continue reading

Posted in Mastering Java Swing, Complete Course | Tagged , , , , , |

Java for Complete Beginners (Video), Part 29: Upcasting and Downcasting

Understand the import topic of upcasting and downcasting in Java with this tutorial; in this video I’ll explain both concepts, why downcasting requires a special syntax while upcasting doesn’t, and we’ll look at precisely what determines what methods can be … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , , |

Mastering Java Swing: Useful Resources, Part 1

This is the first video in a complete course on desktop and browser-based programming in Java. The complete course covers almost every major topic in Swing programming, including desktop applications, databases and animation. Get two more free videos plus a … Continue reading

Posted in Mastering Java Swing, Complete Course | Tagged , , , , , |

Java for Complete Beginners (Video), Part 28: Casting Numerical Values

A tutorial on casting numerical types; when and why you need casts, and a pitfall to watch out for. When the video is running, click the maximize button in the lower-right-hand corner to make it full screen. Code for this … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , |

Java for Complete Beginners (Video), Part 27: Encapsulation and the API Docs

What is encapsulation and what’s the point of it? We’ll take a look at the meaning and benefits of encapsulation in this tutorial. We’ll also see an example of encapsulation in the real world by looking at the API document … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , , |

Java for Complete Beginners (Video), Part 26: Polymorphism

This is a tutorial on polymorphism; a big word for a fairly simple but very useful concept, without which object-oriented programming would be a lot trickier. When the video is running, click the maximize button in the lower-right-hand corner to … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , |

Java for Complete Beginners (Video), Part 25: Public, Private, Protected

Discover the meaning of public, private and protected in the Java programming language. Public, private and protected are confusing for beginners, but once you understand how to use classes, they’re actually quite simple. When the video is running, click the … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , , , , |

Java for Complete Beginners (Video), Part 24: Packages

How to use packages in Java. Packages are an important tool for organising your code; you’ll also need to understand packages to use other people’s code. When the video is running, click the maximize button in the lower-right-hand corner to … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , |

Eclipse Shortcuts: Tips and Tricks for the Eclipse IDE for Java Developers

Learn some tips and tricks that can speed up your Java development in the Eclipse IDE, saving you time and making your code beautiful. When the video is running, click the maximize button in the lower-right-hand corner to make it … Continue reading

Posted in Java | Tagged , , |

Java for Complete Beginners (Video), Part 23: Interfaces

A tutorial on interfaces in Java. Discover how you can use interfaces almost everywhere where you’d normally use classes, with one important exception. Interfaces have a variety of uses, including helping to specify functionality, helping to separate one class from … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , |

Java for Complete Beginners (Video), Part 22: Inheritance

A tutorial on the important topic of inheritance in Java — one of the fundamental building blocks of OOP (Object Oriented Programming). (Apologies for the dodgy sound on this video). When the video is running, click the maximize button in … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , |

Natural Ordering and the Comparable Interface: Java Collections Framework Video Tutorial, Part 8

Learn how to give your classes a “natural order”. A tutorial on ordering your objects in TreeSets and TreeMaps and with Collections.sort() for Lists, using the Comparable Interface. In this tutorial I also take a look at the Collection interface … Continue reading

Posted in Java, Java Collections Framework | Tagged , , , , , |

Sorting Lists Using Comparators: Java Collections Framework Video Tutorial, Part 7

A tutorial on sorting ArrayLists and other lists using the Comparator interface. In this tutorial you’ll learn how to sort your Java lists in an arbitrary order. After starting the video, click the maximise button to make it fullscreen so … Continue reading

Posted in Java, Java Collections Framework | Tagged , , , , , |

Using Custom Objects in Sets and as Map Keys: Java Collections Framework Video Tutorial, Part 6

A tutorial on using your own objects as keys in Maps or in Sets. To use your own objects as keys in Maps or in Sets you need to tell Java how to compare your objects, by implementing the hashCode() … Continue reading

Posted in Java, Java Collections Framework | Tagged , , , , , |

HashSet and Sets: Java Collections Framework Video Tutorial, Part 5

A tutorial on sets in Java; in this tutorial I show you how to use HashSet, TreeSet and LinkedHashSet, plus how to use the Set interface methods and how to do stuff like finding the intersection of two sets. After … Continue reading

Posted in Java, Java Collections Framework | Tagged , , , , , , , , |

Java for Complete Beginners (Video), Part 21: toString()

How to use the important toString() method in Java, and a bit about the Object class that’s the grandfather of all objects in Java. When the video is running, click the maximize button in the lower-right-hand corner to make it … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , |

Sorted Maps: Java Collections Framework Video Tutorial, Part 4

A tutorial on sorted maps in Java, plus some explanation of the Map interface and interfaces in general. After starting the video, click the maximise button to make it fullscreen so you can see the code! Code For This Tutorial … Continue reading

Posted in Java, Java Collections Framework | Tagged , , , , , , , |

Java for Complete Beginners (Video), Part 20: StringBuilder and String Formatting

How to use StringBuilder, StringBuffer and why you should use them. This video also unveils the mystery of formatting strings with printf() and related methods; vital skills for any Java course or aspiring software developer. When the video is running, … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , , |

HashMap: Java Collections Framework Video Tutorial, Part 3

A tutorial on HashMap. Maps are data collections that function like lookup tables; basically you can store objects via “keys” (names, IDs, or even complex objects) and quickly retrieve them without having to look through an entire list. After starting … Continue reading

Posted in Java, Java Collections Framework | Tagged , , , , , |

Java for Complete Beginners (Video), Part 19: Static (and Final)

A tutorial on the static keyword in Java. The first part of the tutorial covers the basic meaning of static; after that we look at what you can do with static, including counting objects, assigning IDs to objects automatically, and … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , , , |

LinkedList: Java Collections Framework Video Tutorial, Part 2

The second part of the tutorial series on the Java Collections Framework; in this tutorial I explain when to use LinkedList rather than ArrayList; we look at how the two classes work internally and I also explain a bit about … Continue reading

Posted in Java, Java Collections Framework | Tagged , , , , |

Java Multithreading: Interrupting Threads (Video Tutorial Part 14)

What exactly are those pesky InterruptedExceptions? In this video I show you how to interrupt running threads in Java using the built-in thread interruption mechanism. After starting the video, click the maximise button to make it fullscreen so you can … Continue reading

Posted in Java, Java Multithreading, Java Video Tutorials (Advanced) | Tagged , , , , , |

Java for Complete Beginners (Video), Part 18: Constructors

A tutorial on constructors in Java; what are they, how to create them, using multiple constructors with different parameters and calling constructors from within other constructors. When the video is running, click the maximize button in the lower-right-hand corner to … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , , , |

Creating Databases and Tables: MySQL for Beginners, Part 1

The first part of a tutorial series on the popular free MySQL database. In this video I show you how to create databases and add some data. Commands demonstrated in this video (these commands create a database called shop and … Continue reading

Posted in MySQL | Tagged , , , , , , |

Java for Complete Beginners (Video), Part 17: Setters and ‘this’

How to use setters, also known as set methods or mutators, in Java. In this video I also take a look at the ‘this’ keyword and when to use it. When the video is running, click the maximize button in … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , , |

Java for Complete Beginners (Video), Part 16: Method Parameters

How to pass parameters (values and variables) to your methods; a vital programming skill. I also discuss something that usually confuses beginners — namely, how data flows from one variable to another when you pass the variable to a method. … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , , |

Java for Complete Beginners (Video), Part 15: Getters and Return Values

Using get methods or “getters” in your Java classes, and how to return values from methods in general. When the video is running, click the maximize button in the lower-right-hand corner to make it full screen. Code for this tutorial: … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , , |

Java Multithreading: Callable and Future (Video Tutorial Part 13)

How to use Callable and Future in Java to get results from your threads and to allow your threads to throw exceptions. Plus, Future allows you to control your threads, checking to see if they’re running or not, waiting for … Continue reading

Posted in Java, Java Multithreading, Java Video Tutorials (Advanced) | Tagged , , , , , , |

Java for Complete Beginners (Video), Part 14: Methods

How to add methods (subroutines) to your classes in Java. In this tutorial we’ll look at adding subroutines to our basic Person class, so that the Person objects can do stuff as well as containing data. When the video is … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , , , |

ArrayList: Java Collections Framework Video Tutorial, Part 1

The first part of a series on the Java Collections Framework, an absolutely vital set of classes for organising data in your code. In this part we’ll look at ArrayList; an expandable array. ArrayList is probably the most used and … Continue reading

Posted in Java, Java Collections Framework | Tagged , , , , |

Java Multithreading: Semaphores (Video Tutorial Part 12)

A tutorial on semaphores in Java. Semaphores are mainly used to limit the number of simultaneous threads that can access a resources, but you can also use them to implement deadlock recovery systems since a semaphore with one permit is … Continue reading

Posted in Java, Java Multithreading, Java Video Tutorials (Advanced) | Tagged , , , , , |

Java Swing: Events (Video Tutorial Part 5)

A tutorial on how to implement custom events and how to deal with events generally in Java Swing applications. This tutorial shows you how to wire up your Swing app, so that the different parts of the application can communicate … Continue reading

Posted in Java, Java Swing (GUI) | Tagged , , , , |

Java Multithreading: Deadlock (Video Tutorial Part 11)

The causes of deadlock and two things you can do about it. This video also covers how to write a method that can safely acquire any number of locks in any order without causing deadlock, using the tryLock() method of … Continue reading

Posted in Java, Java Multithreading, Java Video Tutorials (Advanced) | Tagged , , , , |

Programming Flash Games for Free Part 1: Hello World

Want to program Flash games for free? You can, using the tools I’ll show you in this video tutorial. Learn how to write games and other graphically rich applications that run in a browser. This tutorial assumes that you already … Continue reading

Posted in AS3 (Flash) | Tagged , , , , , , |

Java Multithreading: Re-entrant Locks (Video Tutorial Part 10)

How to use the ReentrantLock class in Java as an alternative to synchronized code blocks. ReentrantLocks let you do all the stuff that you can do with synchronized, wait and notify, plus some more stuff besides that may come in … Continue reading

Posted in Java, Java Multithreading, Java Video Tutorials (Advanced) | Tagged , , , , |

Java Swing: GridBagLayout (Video Tutorial Part 4)

Conquer your fears of this, the most fearsome of the layout managers in Java, but also the most flexible and the most useful. Many Java programmers pretty much just use this one layout manager for everything. I explain step by … Continue reading

Posted in Java, Java Swing (GUI), Java Video Tutorials (Advanced) | Tagged , , , , |

Java Swing: Panels (Video Tutorial Part 3)

How to add forms to your Swing application using JPanel. In this tutorial I show you how to begin to organise your Swing app and divide it into separate areas; in the next tutorial we’ll get onto actually using GridBagLayout … Continue reading

Posted in Java, Java Swing (GUI), Java Video Tutorials (Advanced) | Tagged , , , , |

Java Swing: Adding Components (Video Tutorial Part 2)

A tutorial on adding components to your Swing applicatio. This tutorial covers buttons, text areas and BorderLayout. I also show you some useful web pages, including the free WindowBuilderPro from Google and the Swing Visual Guide pages. In the next … Continue reading

Posted in Java, Java Swing (GUI), Java Video Tutorials (Advanced) | Tagged , , , , |

Java for Complete Beginners (Video), Part 13: Classes and Objects

A basic tutorial on classes and objects in Java. What is a class? How do you create objects and classes and how do you use them? When the video is running, click the maximize button in the lower-right-hand corner to … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , |

Java Multithreading: Low-Level Producer-Consumer (Video Tutorial Part 9)

In this tutorial we’ll look at how to implement the producer-consumer pattern using “low level” techniques; namely, wait, notify and synchronized. This isn’t the best way to implement a producer-consumer pattern in Java (see tutorial 7 for the best way); … Continue reading

Posted in Java, Java Multithreading, Java Video Tutorials (Advanced) | Tagged , , , , |

Java for Complete Beginners (Video), Part 12: Multi-dimensional Arrays

How to work with multi-dimensional arrays in Java and info on how multi-dimensional arrays actually work, plus some tips on how to remember which index is which. When the video is running, click the maximize button in the lower-right-hand corner … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , |

Java Multithreading: Wait and Notify (Video Tutorial Part 8)

A tutorial on wait and notify in Java; low-level multithreading methods of the Object class that allow you to have one or more threads sleeping, only to be woken up by other threads at the right moment. Extremely useful for … Continue reading

Posted in Java, Java Multithreading, Java Video Tutorials (Advanced) | Tagged , , , , |

Java Multithreading: Producer-Consumer (Video Tutorial Part 7)

A tutorial on how to implement the producer-consumer pattern in Java using the ArrayBlockingQueue Java class. Producer-Consumer is the situation where one or more threads are producing data items and adding them to a shared data store of some kind … Continue reading

Posted in Java, Java Multithreading, Java Video Tutorials (Advanced) | Tagged , , , , |

Java for Complete Beginners (Video), Part 11: Arrays of Strings

A tutorial on String arrays in Java, plus another way to iterate through an array, and more stuff on references vs. values. When the video is running, click the maximize button in the lower-right-hand corner to make it full screen. … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , |

Java Multithreading: Countdown Latches (Video Tutorial Part 6)

A video tutorial on using the excellent CountDownLatch Java class to synchronize your threads’ activities. After starting the video, click the maximise button to make it fullscreen so you can see the code! Code For This Tutorial import java.util.concurrent.CountDownLatch; import … Continue reading

Posted in Java, Java Multithreading, Java Video Tutorials (Advanced) | Tagged , , , , |

Java for Complete Beginners (Video), Part 10: Arrays

How to use arrays of integers in Java; also some stuff on the important difference between values and references. When the video is running, click the maximize button in the lower-right-hand corner to make it full screen. Code for this … Continue reading

Posted in Java, Java Video Tutorials (Beginners) | Tagged , , |

Java Multithreading: Thread Pools (Video Tutorial Part 5)

A tutorial on how to manage multiple threads in Java using thread pools. With thread pools you can assign a whole gaggle of threads to work through your queue of tasks. After starting the video, click the maximise button to … Continue reading

Posted in Java, Java Multithreading, Java Video Tutorials (Advanced) | Tagged , , , , |

Java for Complete Beginners (Video), Part 9: Switch

How to use the switch statement in Java; a construct that many programmers neglect but that invariably appears early on in tests and courses! When the video is running, click the maximize button in the lower-right-hand corner to make it … Continue reading

Posted in Java, Java Tutorial, Java Video Tutorials (Beginners) | Tagged , , |

Java Multithreading: Lock Objects (Video Tutorial Part 4)

This is the fourth part of our advanced Java multi-threading tutorial. In this tutorial I show you how you can use multiple locks to speed up complex multi-threaded code, sometimes dramatically. After starting the video, click the maximise button to … Continue reading

Posted in Java, Java Multithreading, Java Video Tutorials (Advanced) | Tagged , , , , |

Java Swing: A Hello World GUI App (Video Tutorial Part 1)

Interested in GUI programming in Java? In this tutorial I show you how to build up a minimal “Hello World” user interface (Swing) app in Java. After starting the video, click the maximise button to make it fullscreen so you … Continue reading

Posted in Java, Java Swing (GUI), Java Video Tutorials (Advanced) | Tagged , , , , |

Java for Complete Beginners (Video), Part 8: Do … While

Do…while loops in Java, plus a look at variable scoping and multi-line comments. In this tutorial I tackle a task that’s often assigned to beginners on Java courses; looping until the user enters some particular input. When the video is … Continue reading

Posted in Java, Java Tutorial, Java Video Tutorials (Beginners) | Tagged , , |

Java Multithreading: Synchronized (Video Tutorial Part 3)

This is the third part of our advanced Java multi-threading tutorial. In this tutorial we look at using the synchronized keyword to coordinate actions between threads and prevent them screwing up each other’s work. After starting the video, click the … Continue reading

Posted in Java, Java Multithreading, Java Video Tutorials (Advanced) | Tagged , , , , |

Java for Complete Beginners (Video), Part 7: Getting User Input

How to get console user input in your Java programs using the JDK Scanner class. When the video is running, click the maximize button in the lower-right-hand corner to make it full screen. Code for this tutorial: import java.util.Scanner; public … Continue reading

Posted in Java, Java Tutorial, Java Video Tutorials (Beginners) | Tagged , , , |

Java Multithreading: Volatile – Basic Thread Communication (Video Tutorial Part 2)

The second part of the advanced Java multi-threading tutorial. In this tutorial we look at using the volatile keyword to communicate between threads using flags. We also look at why the potential uses of volatile are somewhat limited. After starting … Continue reading

Posted in Java, Java Multithreading, Java Video Tutorials (Advanced) | Tagged , , , , |

Java Multithreading: Starting Threads (Video Tutorial Part 1)

Does multithreading seem like a black art to you? This is the first part of an advanced Java tutorial on multithreading that hopefully will help you out. In this tutorial we look at the two ways of starting a thread … Continue reading

Posted in Java, Java Multithreading, Java Video Tutorials (Advanced) | Tagged , , , , |

Java for Complete Beginners (Video), Part 6: If

A tutorial on the if() statement, plus some stuff on using break to break out of loops. When the video is running, click the maximize button in the lower-right-hand corner to make it full screen. Code for this tutorial: public … Continue reading

Posted in Java, Java Tutorial, Java Video Tutorials (Beginners) | Tagged , , , |

Java for Complete Beginners (Video), Part 5: For Loops

In the fifth part of the Java tutorial for beginners video series using Eclipse, we look using ‘for’ loops and printf(). Code for this tutorial: public class Application { public static void main(String[] args) { for(int i=0; i < 5; … Continue reading

Posted in Java, Java Tutorial, Java Video Tutorials (Beginners) | Tagged , , , |

Java for Complete Beginners (Video), Part 4: While Loops

In the fourth part of the Java tutorial for beginners video series using Eclipse, we look using loops to make your code repeat statements multiple times. We also take a look at conditions. Code for this tutorial: public class Application … Continue reading

Posted in Java, Java Tutorial, Java Video Tutorials (Beginners) | Tagged , , , |

Java for Complete Beginners (Video), Part 3: Strings

In the third part of the Java tutorial for beginners video series, we look at working with text using the String class. We also get our first real peek at using classes and objects. Code for this tutorial: public class … Continue reading

Posted in Java, Java Tutorial, Java Video Tutorials (Beginners) | Tagged , , , |

Java for Complete Beginners (Video), Part 2: Using Variables

In this second part of the Java tutorial for beginners series, we look at declaring and initializing variables — one of the most basic building blocks of any computer program. Code for this tutorial: public class Application { public static … Continue reading

Posted in Java, Java Tutorial, Java Video Tutorials (Beginners) | Tagged , , , |

Java for Complete Beginners (Video), Part 1: A Hello World Program

The first in a series of video tutorials on Java for absolute beginners, using the free Eclipse IDE. In this first video, I show you how to create a “hello world” Java program with a minimum of typing! Before you … Continue reading

Posted in Java, Java Tutorial, Java Video Tutorials (Beginners) | Tagged , , , |