Java

View:  
Sorted by:  

Getting Things Done with Eclipse

Once you’ve installed Eclipse, take advantage of all the features to enhance the IDE (integrated development environment) and create effective Java applications. Check out all the stuff you can do: [more…]

Java and JavaScript Resources for Building a Web Site

Java applets add power and functionality to your Web site. JavaScript provides enhanced user interfaces and other functionality to create dynamic Web sites. These two technologies help your Web site be [more…]

And Operators (& and &&) in Java

Java has two operators for performing logical And operations: & and &&. Both combine two Boolean expressions and return true only if both expressions are [more…]

How to Use an Anonymous Class in Java

An anonymous class in Java is a class not given a name and is both declared and instantiated in a single statement. You should consider using an anonymous class whenever you need to create a class that [more…]

Java: Use Arrays with Two Dimensions or More

In Java, the elements of an array can be any type of object you want, including another array. This is called a two-dimensional array — or (sometimes) an [more…]

Assignment Statements in Java

An assignment statement in Java uses the assignment operator (=) to assign the result of an expression to a variable. In its simplest form, you code it like this: [more…]

How to Use Blocks in Java

A block in Java is a group of one or more statements enclosed in braces. A block begins with an opening brace ({) and ends with a closing brace (}). Between the opening and closing braces, you can code [more…]

How to Use Class Declarations in Java

In Java programming, a class is defined by a class declaration, which is a piece of code that follows this basic form: [more…]

How to Use Comments in Java

A comment in Java is a bit of text that provides explanations of your code. The compiler ignores comments, so you can place any text you want in a comment. Using plenty of comments in your programs is [more…]

How to Use a Constructor in Java

A constructor in Java is a block of code similar to a method that’s called when an instance of an object is created. Here are the key differences between a constructor and a method: [more…]

What You Need to Know About Exceptions in Java

An exception is an object that’s created when an error occurs in a Java program, and Java can’t automatically fix the error. The exception object contains information about the type of error that occurred [more…]

How to Use a do...while Statement in Java

A do...while statement in Java programming is similar to a whilestatement but with a critical difference: In a do...while statement, the condition that stops the loop isn’t tested until after the statements [more…]

The Eight Data Types of Java

The term data type refers to the type of data that can be stored in a variable. Sometimes, Java is called a “strongly typed language” because when you declare a variable, you must specify the variable’s [more…]

How to Use the final Command in Java

Here are three ways to use the finalcommand in Java: final class, final method, and final variables. The following Java coding examples will teach you all about the command [more…]

Floating-Point Data Types in Java

Floating-point numbers are numbers that have fractional parts (usually expressed with a decimal point). You should use a floating-point type in Java programs whenever you need a number with a decimal, [more…]

How to Use a for Statement in Java

A for statement in Java creates loops in which a counter variable is automatically maintained. The for statement lets you set an initial value for the counter variable, the amount to be added to the counter [more…]

Create a Generic Class in Java

A generic class in Java is a class that can operate on a specific type specified by the programmer at compile time. To accomplish that, the class definition uses [more…]

How to Use if Statements in Java

In its most basic form, an ifstatement executes a single statement or a block of statements if a boolean expression evaluates to true. Here’s the syntax: [more…]

Download and Install the Java Development Kit

The Java Development Kit (JDK) download comes in two versions: an online version that requires an active Internet connection to install the JDK, and an offline version that lets you download the JDK installation [more…]

How to Use the java Command

The java command runs a Java program from a command prompt. The basic syntax is [more…]

What Are Java Arrays?

An array in Java is a set of variables referenced by using a single variable name combined with an index number. Each item of an array is an element. All the elements in an array must be of the same type [more…]

How to Use Boolean Expressions in Java

A boolean type can have one of two values: true or false. A boolean is used to perform logical operations, most commonly to determine whether some condition is [more…]

What Are Checked Exceptions in Java?

Checked exceptions are exceptions that the designers of Java feel that your programs absolutely must provide for, one way or another. Whenever you code a statement that could throw a checked exception, [more…]

How to Use the jar Command

You use the jar command in Java to create a JAR file, which is a single file that can contain more than one class in a compressed format that the Java Runtime Environment can access quickly. [more…]

How to Use the javap Command

The javap command is called the Java “disassembler” because it takes apart class files and tells you what’s inside them. You won’t use this command often, but using it to find out how a particular Java [more…]

Listings:1-2526-5051-7576-100more...

Sign Up for RSS Feeds

Computers & Software
Great Gadget Giveaway -- Enter to Win!

Inside Dummies.com