Please note that this is an “Intermediate” article; it therefore assumes you have read all previous “Beginner” articles, and you know how to create an instance of a class. Introduction Generics allow a type or method to operate on objects of varying types, while providing compile-time type safety. They can be used to achieve parametric Read More →

Share

Please note that this article assumes you have read my previous tutorials on data types, variables, conditionals and loops, etc. and know how to properly compile a Hello, World! program. Introduction Arrays, which were mentioned briefly in Basic Concepts – Part 2, are found just about everywhere in code. In short, arrays are a simple Read More →

Share

A website about programming wouldn’t be very useful if I only showed snippets of code, and never a real-world example. In this post, I’m going to reveal code for an electricity calculator… and here’s how it works. The user starts up the program, types in some information, and the program tells the user some dollar Read More →

Share

Suppose you’re reviewing a modest-sized geocaching program composed of 6,000 lines of Java Code. It’s late at night, and you’re trying to figure out how a certain subroutine works. You know it asks the user for information about Longitude, but you aren’t sure how it works under the hood. Which of the below samples is Read More →

Share