Java: Most Popular Articles
These articles are the most popular over the last month.
Is Your PC 32-bit or 64-bit?
Follow these steps if you want to find out if your computer is 32-bit or 64-bit.
Follow these steps if you want to find out if your computer is 32-bit or 64-bit.
What Is Java?
Find out what Java is, who created it, and why people choose to program with it.
Find out what Java is, who created it, and why people choose to program with it.
Download the JDK
Make your first Java download the right one. Step-by-Step instructions on how to download the latest version of the JDK.
Make your first Java download the right one. Step-by-Step instructions on how to download the latest version of the JDK.
Creating Your First Program
Are you ready to start programming in Java? Follow this step-by-step tutorial to learn how to write, compile and run Java programs.
Are you ready to start programming in Java? Follow this step-by-step tutorial to learn how to write, compile and run Java programs.
Declaring Variables
The use of variables is key to any program. Learn how to declare and initialize variables in Java.
The use of variables is key to any program. Learn how to declare and initialize variables in Java.
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.
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.
Install the JDK
Step-by-Step instructions on how to install the latest version of the JDK.
Step-by-Step instructions on how to install the latest version of the JDK.
Reserved Words
Here you will find a list of words that you cannot use as identifiers in a Java program.
Here you will find a list of words that you cannot use as identifiers in a Java program.
Odd Magic Squares
Turtles, magic and squares will conspire to test your logic in this exercise.
Turtles, magic and squares will conspire to test your logic in this exercise.
How to Generate Random Numbers
Learn how to generate random numbers using the java.util.Random class.
Learn how to generate random numbers using the java.util.Random class.
What Is Inheritance?
Learn about object inheritance and how it can be used to create a relationship between objects that share common characteristics.
Learn about object inheritance and how it can be used to create a relationship between objects that share common characteristics.
Java Naming Conventions
Using standard Java naming conventions will increase the readability of your code and make it easier to maintain.
Using standard Java naming conventions will increase the readability of your code and make it easier to maintain.
Create a Simple Window
How to use JFrame to create a simple window for a Java application.
How to use JFrame to create a simple window for a Java application.
The Constructor Method
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.
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.
Generate Unique Random Numbers
Sometimes the random numbers to be picked need to be unique.
Sometimes the random numbers to be picked need to be unique.
Common Runtime Error
See if you can debug a piece of code that produces one of the most fundamental Java runtime errors.
See if you can debug a piece of code that produces one of the most fundamental Java runtime errors.
Build a Java Applet
Follow this step-by-step tutorial to learn how to write, compile and run Java applets.
Follow this step-by-step tutorial to learn how to write, compile and run Java applets.
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.
Understanding object-oriented programming is fundamental to becoming a truly great Java programmer. The key concepts of objects are discussed in this article.
What Is Unicode?
Learn about the Unicode standard, a global way to encode the characters that computers use.
Learn about the Unicode standard, a global way to encode the characters that computers use.
Designing and Creating Objects
Follow this step-by-step guide to learn how to design and create an object.
Follow this step-by-step guide to learn how to design and create an object.
Primitive Data Types
The Java language provides eight primitive data types that define simple values a program can use.
The Java language provides eight primitive data types that define simple values a program can use.
Definition: Aggregation
Aggregation is a relationship between two objects that is best described as a "has-a" relationship.
Aggregation is a relationship between two objects that is best described as a "has-a" relationship.
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.
When coding in Java it's important to remember that Java is case sensitive. Here are some tips to avoid common case sensitivity pitfalls.
Java and the Mac OS X
Things are a little different for Java developers on Mac OS X. Find out how Java fits in with Apple computers.
Things are a little different for Java developers on Mac OS X. Find out how Java fits in with Apple computers.
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).
Arithmetic operators perform the same basic operations you would expect if you used them in mathematics (with the exception of the percentage sign).
Implementation Comments
Enhance the readability of your programs by using Java comments.
Enhance the readability of your programs by using Java comments.
Data Encapsulation
Find out about data encapsulation, the most important concept of object-oriented programming.
Find out about data encapsulation, the most important concept of object-oriented programming.
Definition: Composition
Composition is a relationship between two classes that is based on the aggregation relationship.
Composition is a relationship between two classes that is based on the aggregation relationship.
IDEs Versus Text Editors
To learn Java you need somewhere to write your programs. Here's a guide to using an IDE versus a text editor.
To learn Java you need somewhere to write your programs. Here's a guide to using an IDE versus a text editor.
Definition: Method Signature
A method signature is part of the method declaration. It is the combination of the method name and the parameter list.
A method signature is part of the method declaration. It is the combination of the method name and the parameter list.
Doubly-Even Magic Squares
Take the odd magic squares program one step further with another test of your programming logic.
Take the odd magic squares program one step further with another test of your programming logic.
Definition: Association
The association relationship is a way of describing the fact that a class knows about holds another class
The association relationship is a way of describing the fact that a class knows about holds another class
What Is a Package?
Bring a sense of order to your classes through the use of packages.
Bring a sense of order to your classes through the use of packages.
Build a Simple Robocode Robot
It's time for some robot carnage.
It's time for some robot carnage.
Imperative Language
An imperative language uses a sequence of statements to determine how to reach a certain goal.
An imperative language uses a sequence of statements to determine how to reach a certain goal.
Definition: Ternary Operator
The ternary operator "?:" earns its name because it's the only operator to take three operands.
The ternary operator "?:" earns its name because it's the only operator to take three operands.
Definition of Start Menu
The Start menu contains shortcuts to programs that are installed on the Windows operating system.
The Start menu contains shortcuts to programs that are installed on the Windows operating system.
Compound Assignment Operator
Compound assignment operators provide a shorter syntax to assign the results of the arithmetic and bitwise operators.
Compound assignment operators provide a shorter syntax to assign the results of the arithmetic and bitwise operators.
Playing With Wrappers
Play around with wrapper classes in this simple exercise.
Play around with wrapper classes in this simple exercise.
Counting Rabbits
Here's a idealistic way for counting rabbits – can you determine how many will exist after 20 generations?
Here's a idealistic way for counting rabbits – can you determine how many will exist after 20 generations?
Robocode
Competition in the Robocode arena is fierce. Learn Java by trying to build a robot that will send all the others to the scrap heap!
Competition in the Robocode arena is fierce. Learn Java by trying to build a robot that will send all the others to the scrap heap!
Definition: Octal
Octal refers to a numbering system that has a base of eight. This means it only uses the eight numerals 0,1,2,3,4,5,6,7 for each digit of a number.
Octal refers to a numbering system that has a base of eight. This means it only uses the eight numerals 0,1,2,3,4,5,6,7 for each digit of a number.
Definition: Hexadecimal
Hexadecimal refers to a numbering system that has a base of 16. This means 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.
Hexadecimal refers to a numbering system that has a base of 16. This means 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.
Definition: Identifier
An identifier is simply a name given to a package, class, interface, method, or variable.
An identifier is simply a name given to a package, class, interface, method, or variable.
Static Fields
Fields can be shared across all objects of the same type through the use of the static modifier.
Fields can be shared across all objects of the same type through the use of the static modifier.
Definition: Operator
Operators are designated characters within the Java language that perform operations on arguments to return a specific result.
Operators are designated characters within the Java language that perform operations on arguments to return a specific result.
Definition: Overloading
Overloading is the ability to define more than one method with the same name in a class.
Overloading is the ability to define more than one method with the same name in a class.
Declarative Language
A declarative language describes what it wants to accomplish rather than focusing on how to achieve that goal
A declarative language describes what it wants to accomplish rather than focusing on how to achieve that goal
Constructor Chaining
Constructor chaining occurs through the use of inheritance.
Constructor chaining occurs through the use of inheritance.
Definition: Conditional Opera
Conditional operators are used to evaluate a condition that's applied to one or two boolean expressions.
Conditional operators are used to evaluate a condition that's applied to one or two boolean expressions.
Definition: Implicit Parameter
In a method call the implicit parameter is the object the method belongs to.
In a method call the implicit parameter is the object the method belongs to.
Using Packages
Learn how to include the functionality of packaged classes into your programs.
Learn how to include the functionality of packaged classes into your programs.
Definition: Variable
A variable is a container that holds values that are used in a Java program.
A variable is a container that holds values that are used in a Java program.
Definition: Super
The super keyword enables a subclass to call the methods and fields of its superclass.
The super keyword enables a subclass to call the methods and fields of its superclass.
Shifting Bits
How are you at shifting bits right and left?
How are you at shifting bits right and left?
The Infinite Loop
Can you rewrite this Java code so that there is no longer an infinite loop?
Can you rewrite this Java code so that there is no longer an infinite loop?
Converting Strings
Test your ability to convert Strings to numbers.
Test your ability to convert Strings to numbers.
Using Inheritance
Discover how a class can inherit the state and behaviors of another class.
Discover how a class can inherit the state and behaviors of another class.
Definition: Inheritance
Inheritance enables programmers to define an "is-a" relationship between a class and a more specialized version of that class.
Inheritance enables programmers to define an "is-a" relationship between a class and a more specialized version of that class.
Definition: Superclass
A superclass is a class that has been extended by another class.
A superclass is a class that has been extended by another class.
Definition: Operand
The arguments that have an operation performed on them by an operator are called operands.
The arguments that have an operation performed on them by an operator are called operands.
Definition: Modifier
A modifier is a keyword placed in a class, method or variable declaration that changes how it operates.
A modifier is a keyword placed in a class, method or variable declaration that changes how it operates.
The Hailstone Sequence
A clever German mathematician created a simple formula that will produce what is sometimes known as the hailstone sequence. Can you write a program to display that sequence for a certain number?
A clever German mathematician created a simple formula that will produce what is sometimes known as the hailstone sequence. Can you write a program to display that sequence for a certain number?
Definition: Concatenation
Concatenation describes the operation of joining two strings together.
Concatenation describes the operation of joining two strings together.
Control Flow Statement
Normally the statements that make up a Java program are executed in the order that they are written. To allow for more flexibility, a control flow statement can be employed to execute statements based on whether a certain condition is met.
Normally the statements that make up a Java program are executed in the order that they are written. To allow for more flexibility, a control flow statement can be employed to execute statements based on whether a certain condition is met.
Expression Statement
Some expressions can be used as statements by simply adding a semicolon.
Some expressions can be used as statements by simply adding a semicolon.
Literal Loop
Can you write loops using hexadecimal and octal literals?
Can you write loops using hexadecimal and octal literals?
Immutable
Immutable means unchangeable.
Immutable means unchangeable.
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.
Some classes are designed not to be extended by other classes. Find out how to prevent a class being inherited by another.
Definition: Source Code
Programmers write software programs using a programming language, e.g., Java. The programming language provides a series of instructions they can use to create the program they want. The instructions a programmer uses to build the program are known as source code.
Programmers write software programs using a programming language, e.g., Java. The programming language provides a series of instructions they can use to create the program they want. The instructions a programmer uses to build the program are known as source code.
PIE Theory
An online game to help you learn JavaFX whilst grappling with paranormal and strange events. Can you help investigate the next JUMP?
An online game to help you learn JavaFX whilst grappling with paranormal and strange events. Can you help investigate the next JUMP?
Definition: AWT
AWT stands for “Abstract Window Toolkit”.
AWT stands for “Abstract Window Toolkit”.
Definition: Equality Operator
In Java, there are two equality operators to determine whether one operand is equal to, or not equal to the other operand
In Java, there are two equality operators to determine whether one operand is equal to, or not equal to the other operand
Definition: Denary
The denary (or decimal) numbering system is the most widely used in the world. It has a base of 10 and uses the numerals 0,1,2,3,4,5,6,7,8,9.
The denary (or decimal) numbering system is the most widely used in the world. It has a base of 10 and uses the numerals 0,1,2,3,4,5,6,7,8,9.
Java - Articles
An index of articles for the Java guide site.
An index of articles for the Java guide site.
Definition: Deprecated
When a new version of an API is released it's quite common for parts of it to become deprecated.
When a new version of an API is released it's quite common for parts of it to become deprecated.
Definition: Float
A float is a Java data type that is made up of four bytes.
A float is a Java data type that is made up of four bytes.
Definition: API
API stands for “Application Programming Interface”.
API stands for “Application Programming Interface”.
The Collatz Theory
The hailstone sequence is back again. This program is designed to test Lothar Collatz's unproven theory.
The hailstone sequence is back again. This program is designed to test Lothar Collatz's unproven theory.
Definition: JVM
JVM stands for Java Virtual Machine.
JVM stands for Java Virtual Machine.
Definition: XML
XML stands for Extensible Markup Language.
XML stands for Extensible Markup Language.
Void
The void keyword denotes that a method does not have a return type.
The void keyword denotes that a method does not have a return type.
Definition: Literal
A literal is a value that can be written directly into Java source code.
A literal is a value that can be written directly into Java source code.
Definition: Parameter
Parameters are the variables that are listed as part of a method declaration.
Parameters are the variables that are listed as part of a method declaration.
Definition: Regular Expression
A regular expression defines a pattern that matches a certain set of strings.
A regular expression defines a pattern that matches a certain set of strings.
Relational Operator
A relational operator compares two operands to determine whether one is greater than, greater than or equal to, less than, less than or equal to the other.
A relational operator compares two operands to determine whether one is greater than, greater than or equal to, less than, less than or equal to the other.
Uncoded Line
This time rather than decoding a line, it's time to encode one.
This time rather than decoding a line, it's time to encode one.
Encoded First Line
I have cunningly encoded a first line from an Iain Banks book. Can you write a program to decode it?
I have cunningly encoded a first line from an Iain Banks book. Can you write a program to decode it?
Apatite
Apatite enables developers to search the Java API using associative browsing.
Apatite enables developers to search the Java API using associative browsing.
Jadeite
Jadeite extends Java API documentation by encouraging developers to edit the API entries with pointers to relevant classes.
Jadeite extends Java API documentation by encouraging developers to edit the API entries with pointers to relevant classes.
Going Around and Around
Have you ever wanted to put your programs into a spin? Here's your chance.
Have you ever wanted to put your programs into a spin? Here's your chance.
Definition: RIA
RIA stands for "Rich Internet Application". A rich internet application normally runs on a web page but provides the same functionality as a normal desktop application.
RIA stands for "Rich Internet Application". A rich internet application normally runs on a web page but provides the same functionality as a normal desktop application.
Java - Profiles
An index of Profiles for the Java guide site.
An index of Profiles for the Java guide site.
Definition: Strongly Typed
Java is a strongly typed programming language because every variable must be declared with a data type.
Java is a strongly typed programming language because every variable must be declared with a data type.
Definition: NetBeans
NetBeans is a free IDE that can be used to create Java and JavaFX applications
NetBeans is a free IDE that can be used to create Java and JavaFX applications
Definition: JRE
JRE stands for “Java Runtime Environment”.
JRE stands for “Java Runtime Environment”.
Definition of term Windows Key
The Windows key bears the Microsoft Windows logo, and is generally found between the “Ctrl” and “Alt” keys on your keyboard.
The Windows key bears the Microsoft Windows logo, and is generally found between the “Ctrl” and “Alt” keys on your keyboard.
Definition: JDK
JDK stands for "Java Development Kit".
JDK stands for "Java Development Kit".
Code Points (Part II)
Explore the characters produced by code points beyond the lower ranges.
Explore the characters produced by code points beyond the lower ranges.
Breaking Out
Are you a fan of jumping out of loops? If so, where do you land after breaking out?
Are you a fan of jumping out of loops? If so, where do you land after breaking out?
Definition: C
C is a programming language created in the 1970s that is still in use for some operating system software.
C is a programming language created in the 1970s that is still in use for some operating system software.
Declaration Statement
Declaration statements are used to declare variables.
Declaration statements are used to declare variables.
Definition: Garbage Collection
Garbage collection is the process of automatically detecting memory that is no longer in use, and freeing it up so that it can be used again.
Garbage collection is the process of automatically detecting memory that is no longer in use, and freeing it up so that it can be used again.
Definition: Executable
An executable is a file that can be run by a computer.
An executable is a file that can be run by a computer.
Definition: Expression
Expressions are essential building blocks of any Java program. They are built using values, variables, operators and method calls.
Expressions are essential building blocks of any Java program. They are built using values, variables, operators and method calls.
Code Points
Try and discover which characters are represented by the Unicode code points.
Try and discover which characters are represented by the Unicode code points.
Definition: Applet
An applet is a Java program that is run through a webpage.
An applet is a Java program that is run through a webpage.
Assignment Operator
The most commonly used operator is the assignment operator.
The most commonly used operator is the assignment operator.
Definition: Jython
Jython is a version of Python written to run on the Java Virtual Machine
Jython is a version of Python written to run on the Java Virtual Machine
Definition: IDE
IDE stands for “Integrated Development Environment”.
IDE stands for “Integrated Development Environment”.
Definition: JAR
JAR stands for Java Archive.
JAR stands for Java Archive.
Definition: New
A Java keyword used to create a new instance of an object.
A Java keyword used to create a new instance of an object.
Definition: Modal
In a graphical user interface, a window or dialog box can be modal or non-modal.
In a graphical user interface, a window or dialog box can be modal or non-modal.
Definition: Subclass
A subclass is a class that extends another class.
A subclass is a class that extends another class.
Definition: Statement
If expressions are akin to clauses in the English language, then statements are like sentences.
If expressions are akin to clauses in the English language, then statements are like sentences.
