1. Tech

Your suggestion is on its way!

An email with a link to:


was emailed to:

Thanks for sharing About.com with others!

Java: Most Popular Articles

These articles are the most popular over the last month.
A Quick Guide to Using Constants Syntax in Java
Throughout the lifetime of a variable its value might change many times. But what if you know the value will never change? Or more importantly you want to make sure it can't change? This is when you need to use a constant.
Sample Java Code for Building a Simple GUI App
An example Java class for building a simple GUI application. This program corresponds to the Coding a Simple Graphical User Interface - Part I
Sample Java Code to Generate Random Numbers
Learn how to generate random numbers using the java.util.Random class.
How to Declare Variables in Java
The use of variables is key to any program. Learn how to declare and initialize variables in Java.
A Quick Guide to Using Accessors and Mutators...
In object-oriented programming sometimes it's necessary to provide access to the private fields of an object. The use of accessors and mutators are a way to enable that access.
Java Code Listing for a Simple Calculator
This program creates a simple calculator that performs addition and subtraction. It highlights how to implement the ActionListener interface in three different ways.
Wondering What Java Is? Here's the Answer
Find out what Java is, who created it, and why people choose to program with it.
How to Tell If Your Computer is 32- or 64-Bit
Follow these steps if you want to find out if your computer is 32-bit or 64-bit.
How to Write Java Source Code
Are you ready to start programming in Java? Follow this step-by-step tutorial to learn how to write, compile and run Java programs.
Understanding Java's 'Cannot Find Symbol' Error...
Cannot Find Symbol is a compile-time error.
A Simple Guide to Creating Basic JFrame Windows
How to use JFrame to create a simple window for a Java application.
A Quick Guide to Using Naming Conventions in Java
Using standard Java naming conventions will increase the readability of your code and make it easier to maintain.
Using Java Constructors: An Easy How-To Guide
When a new instance of an object is created the constructor method is called. Examples of how to create constructor methods in Java are discussed here.
What is Aggregation?
Aggregation is a relationship between two objects that is best described as a
What Is Unicode?
Learn about the Unicode standard, a global way to encode the characters that computers use.
Understanding Reserved Object Variable Words in...
Here you will find a list of words that you cannot use as identifiers in a Java program.
Types of Exceptions
There are three different types of exceptions a Java application might encounter.
A Simple Table Example Java Code Program
An example program showing how to use the JTable class
The association relationship is a way of describing the fact that a class knows about, and holds a reference to another class.
A variable is a container that holds values that are used in a Java program.
Simple Message Dialog Boxes Program
Example Java program code for how to make simple message dialog boxes using the JOptionPane class.
Download and Install the Java SE Development Kit
Make your first Java download the right one. Step-by-Step instructions on how to download the latest version of the JDK.
How to Code a Simple Graphical Interface in...
A step-by-step guide to manually coding a simple graphical user interface. Part two of this step-by-step shows how to code the same graphical user interface using NetBeans Gui Builder.
DefaultTableModel Example Program
An example program to show the DefaultTableModel in action.
Use Java to Generate Unique Random Numbers
Sometimes the random numbers to be picked need to be unique.
Odd Magic Squares
Turtles, magic and squares will conspire to test your logic in this exercise.
Everything You Need to Know to Build Your First...
Follow this step-by-step tutorial to learn how to write, compile and run Java applets.
Static Fields
Fields can be shared across all objects of the same type through the use of the static modifier.
How to Create a Simple Table
A look at the JTable class and how it can be used to make simple tables for GUIs
Parameters are the variables that are listed as part of a method declaration.
Ternary Operator
The ternary operator ?: earns its name because it's the only operator to take three operands.
Method Signature
A method signature is part of the method declaration. It is the combination of the method name and the parameter list.
How to Build a Simple GUI in JavaFX Code
An example JavaFX application to show how to build a simple graphical user interface. The interface is the same as those built using Swing in part 1 and NetBeans GuiBuilder in part two.
A KeyListener Example Program
An example program showing how to implement the KeyListener interface.
A superclass is a class that has been extended by another class.
How Composition is Used in Java
The term composition takes on different meanings depending on the subject, and in Java it has its own meaning as well.
Reached End of File While Parsing
Reached end of file while parsing is a compile time error.
Working with Arrays
How to make use of arrays. Java.
Static Method
Static methods are created using the static keyword.
Creating A Simple Calculator to Handle Button...
Building an interface for a simple calculator program
How to Code a Password Dialog Program in Java
Example Java program code for creating a simple password dialog box.
Compound Assignment Operator
Compound assignment operators provide a shorter syntax to assign the results of the arithmetic and bitwise operators.
Wondering What "Inheritance" Is in Programming?...
Learn about object inheritance and how it can be used to create a relationship between objects that share common characteristics.
Declaration Statement
Declaration statements are used to declare variables.
ComboBox Overview
A look at the JavaFX ComboBox class.
A constant is a variable whose value cannot change once it has been assigned.
How to Create an Input Dialog Box Using Java...
Find out how to use the showInputDialog method of the JOptionPane class to make different kinds of input dialog boxes.
Scope refers to the lifetime and accessibility of a variable. How large the scope is depends on where a variable is declared.
BoxLayout Example Program
An example Java program showing a simple application using the BoxLayout.
How to Use "IF-THEN" and "IF-THEN-ELSE"...
Use the if-then and if-then-else statements when your program needs to make a simple decision about what to do next.
The ActionListener interface is an event listener for actions performed by some graphical components.
An Easy Guide to Using 'CARDLAYOUT' Elements in...
A simple application showing how the CardLayout can be used to switch JPanels.
Introduction to Object-Oriented Programming
Understanding object-oriented programming is fundamental to becoming a truly great Java programmer. The key concepts of objects are discussed in this article.
GridPane Example Program
An overview of how to use the GridPane to make a table format.
BorderPane Example Program
An example of how to use the JavaFX BorderPane layout
Input Dialog Box Program
Example Java program code to make several different types of input dialog boxes using the showInputDialog method of JOptionPane.
If expressions are akin to clauses in the English language, then statements are like sentences.
Conditional Operator
Conditional operators are used to evaluate a condition that's applied to one or two boolean expressions.
Playing Sax
Images of Duke having some fun. Page 4.
Common Runtime Error
See if you can debug a piece of code that produces one of the most fundamental Java runtime errors.
An event typically occurs when a user interacts with a user interface.
How to Generate Random Numbers (Part II)
Following on from the first article on generating random numbers in Java, find out how to generate random fractional numbers and boolean values.
ListView and ComboBox Example Program
Example Java code showing how the ListView and ComboBox JavaFX controls can be used.
Understanding 'Primitive Data Types' in Java
The Java language provides eight primitive data types that define simple values a program can use.
Beginner's Guide to Using an IDE Versus a Text...
Before you start to learn Java, you need somewhere to write your programs. Here's a guide to using an IDE versus a text editor.
How to Implement Java Comments
Enhance the readability of your programs by using Java comments.
An Easy Guide to Designing and Creating Objects...
Follow this step-by-step guide to learn how to design and create an object.
Disabling (or Enabling) the Java Plugin in a...
Here are the steps to disable (or enable) the Java plugin in a browser.
How to Convert Strings to Numbers and Vice...
How to convert Strings to numbers and back again.
The void keyword denotes that a method does not have a return type.
An identifier is simply a name given to a package, class, interface, method, or variable.
Source Code
Source code refers to the programming instructions used to create an application.
Use This Example Code to Create Your Own Binary...
Example code for reading and writing to a binary file one byte at a time.
Creating a Message Dialog Box - Part I
Learn how to use the JOptionPane class to make a simple message dialog box
How Do I Start Learning Java?
A common question new developer are faced with, is where do I start when faced with learning the Java language? Here are some tips.
Fun With Strings Example Code
A Java program to show the String class in action.
Install the Java SE Development Kit
Step-by-Step instructions on how to install the latest version of the JDK.
Understanding 'Overloading' In Java
Overloading is the ability to define more than one method with the same name in a class.
What 'Concatenation' Is in Java Terms
Concatenation describes the operation of joining two strings together.
What Java 'PACKAGES' Are and How to Use Them
Bring a sense of order to your classes through the use of packages.
Data Encapsulation
Find out about data encapsulation, the most important concept of object-oriented programming.
JavaFX CSS Example Program
This example code shows how to simply switch between two JavaFX stylesheets.
Strongly Typed
Java is a strongly typed programming language because every variable must be declared with a data type.
Coding a Simple Graphical User Interface - Part...
This step-by-step guide shows how to build the simple GUI application created in Coding a Simple Graphical User - Part I using the NetBeans GUI Builder.
An object is an instance of a class.
Definition for the Java Term: Event Listener
An event listener receives and process events.
A Progress Bar Example Program
An example Java program showing how to use the JProgressBar
A class specifies the design of an object.
Understanding DefaultTableModel in Java
The DefaultTableModel class in Java is a subclass of the AbstractTableModel that stores data for the JTable when no table model is specifically defined by the programmer.
Using Multiple Main Classes
Whilst learning Java the best way is to compile and run example code. Using multiple classes within a NetBeans project means you can keep all your code examples in one place and try them out independently of each other.
How to Prevent Inheritance
Some classes are designed not to be extended by other classes. Find out how to prevent a class being inherited by another.
Expressions are essential building blocks of any Java program. They are built using values, variables, operators and method calls.
Using Command-line Arguments
How to make use of command-line arguments in your Java applications.
Deleting, Copying and Moving Files
How to delete, copy and move files using nio.2
A GUI is the graphical interface presented to the user of an application.
GridLayout Example Program
Example Java code to show how the GridLayout, the BorderLayout and the BoxLayout can be used to make a customizable graphical user interface for a simple calculator.
Using the Switch Statement for Multiple Choices
Use the switch statement when you want your program to chose between a number of alternative options.
The float data type in Java can be used to store floating point numbers.
Loops are a way of executing the same code block many times.
How to Use an 'ArrayList' in Java
How to use the ArrayList class. Java.
BorderLayout Example Program
An example program to show how to code a BorderLayout layout manager with assigned horizontal and vertical spacing.
Conditional Statements
Conditional statements enable a program to make a decision and preform an action based on that decision.
Java Is Case Sensitive
When coding in Java it's important to remember that Java is case sensitive. Here are some tips to avoid common case sensitivity pitfalls.
Implicit Parameter
In a method call the implicit parameter is the object the method belongs to.
The String Literal
String Literals are used for representing string values in Java code.
TreeView Example Program
Example Java code showing how the TreeView JavaFX control is used.
ChoiceBox Overview
A look at the JavaFX ChoiceBox class
A modifier is a keyword placed in a class, method or variable declaration that changes how it operates.
How to Read and Write Byte Streams
Learn how to read bytes from a binary file one byte at a time.
A subclass is a class that extends another class.
How to Use 'Gridlayout' in Java
A look at how to use the GridLayout layout manager.
How to Use Java Packages
Learn how to include the functionality of packaged classes into your programs.
Constructor Chaining
Constructor chaining occurs through the use of inheritance.
What Is Netbeans?
NetBeans is a sophisticated IDE that aims to help developers build any type of application.
Everything You Need to Know About Java on Mac...
Things are a little different for Java developers on Mac OS X. Find out how Java fits in with Apple computers.
What Is a Dialog Box?
Find out what a dialog box is and how they can be an effective way to get the user’s attention.
missing return statement
missing return statement is a compile-time error.
Countries and Their Capitals
Can you get a user to pick a country from a list and then tell them what the capital city of the country they picked is?
GridPane Overview
How to use the GridPane layout to place child nodes in a grid format.
It’s a way of designing an application that separates data access, business logic and the graphical user interface.
TreeView Overview
A look at the JavaFX TreeView class
How to Create a 'GridBagLayout' in Java (Guide...
Example code showing how the GridBagLayout layout manager can be used to position components.
JavaFX With FXML Using SceneBuilder and NetBeans
How to create a simple JavaFX FXML application using NetBeans and Scene Builder.
The JavaFX Scene Graph
A look at the JavaFX Scene Graph
Arithmetic Operator
Arithmetic operators perform the same basic operations you would expect if you used them in mathematics (with the exception of the percentage sign).
The try-catch-finally blocks
Java handles exception through the use of the try-catch-finally blocks
ItemListener Example Code Program
Example Java code showing the ItemListener event listener in action
A Beginner's Guide to Using NetBeans
If you're new to programming and want to find out what it's like to use an IDE, this is the guide for you. Learn how to write a simple Hello NetBeans World program using the NetBeans IDE.
Assignment Operator
The most commonly used operator is the assignment operator.
CheckBox Overview
A look at the JavaFX CheckBox class
The Structure of Java Program - Hello NetBeans...
A basic look at the structure of a very simple Java program. This article gives a beginner a starting place for understanding the way the Java syntax builds to make a Java program.
Using the Arrays Class
How to use the Arrays class to manipulate Arrays
Event Source
An event source is a component that triggers an event from some action performed on it.
The Infinite Loop - Solution
Can you rewrite this Java code so that there is no longer an infinite loop?
What Is an Exception?
Find out what an exception is and how Java handles them.
Button Overview
A look at the JavaFX Button class
TextField Overview
A look at the JavaFX TextField class
A Java compiler translates the Java code written by a programmer into instructions a computer can execute.
Main Method
The main method is the starting point for the execution of every Java application.
Color Chooser Program
Example Java program code that shows the two static methods of the JColorChooser class in action to make a color chooser dialog box.
Main Class
A main class is a class that contains a main method
How to Handle Mouse Events
A step-by-step by guide implementing the MouseListener, MouseMotionListener, and MouseWheelListener event listeners using a simple gui application.
Coding a Simple Graphical Interface - Part III
A step-by-step guide to coding a JavaFX user interface that has a similarly appearance functionality as the one created in part one using Swing.
How to Use a 'Key Listener Interface' (Java...
How to implement the Key Listener Interface, which provides the ability to find out what keys a user is pressing while a graphical component has the focus of the graphical user interface.
How to Make a Password Dialog Box Using Java...
Any application providing a secure environment for a user needs to be able to safely obtain the password for that user.
FlowLayout Example Program
Example Java code for a program which provides a user with options to change the alignment and spacing of components in a FlowLayout layout manager.
ListView Overview
A look at the JavaFX ListView class
Definition for the Java Term: Literal
A literal is a value that can be written directly into Java source code. Learn more about literal patterns and examples.
Hexadecimal Defined for Java
Java Hexadecimal is a numbering system with a base of 16. It uses all the numerals 0,1,2,3,4,5,6,7,8,9 as well as the letters A,B,C,D,E,F for each digit of a number.
ToggleButton Example Program
Example Java code showing the ToggleButton in action.
Explore Java
By Category
    javaJavacomputeTechba5040a14900010e41800f69ba5040a14900020e41801132http://java.about.comod526F6F74141211liveJeff Friesenjavaguide3OS0001LzNIP11970-01-0110/od/index.htm0526F6F741approved/od
  1. About.com
  2. Tech
  3. Java

©2015 About.com. All rights reserved.