Java for dummies - Technology Means Life

Java for dummies

Share This
A Step by Step guide to learn java and it's all for dummies. It's for making everything very easy and clear like a glass. With the help of this post you can learn Java Programming very easily and than keep practicing to make yourself a perfectionist. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks, etc. Where those designations are missing, note that they are properties of their respective corporations.

Downloading and Installing the Java Development Kit (JDK)

First you need some Java development software. You can choose from several products. In fact, you may already have one of these products on your own computer. If you don't, you can download the basic software [more…]

Getting Started with Java Programming

The late 1980s saw several advances in software development, and by the early 1990s, many large programming projects were being written from prefab components. Java came along in 1995, so it was natural [more…]

Tackling Error Messages in Java Programming

Sometimes, error messages can strike fear into the heart of even the bravest programmer. Fortunately some helpful, calming advice is here — advice to help you solve the problem when you see one of these [more…]

Java Programming: Telling the Computer to Do Something

In Listing 1, below, you get a blast of Java code. Like all novice programmers, you're expected to gawk humbly at the code. But don't be intimidated. When you get the hang of it, programming is pretty [more…]

Understanding Java's Object-Oriented Programming (OOP)

Java is object-oriented. What does that mean? Unlike languages, such as FORTRAN, which focus on giving the computer imperative "Do this/Do that" commands, object-oriented languages focus on data. Of course [more…]

Avoiding Mistakes in Java

The only people who never make mistakes are the people who never do anything at all. But careful planning can help you avoid some of the most common Java goofs, such as the following. [more…]

What Is Jakarta Struts?

Jakarta Struts is incredibly useful in helping you create excellent Web applications. When you use Jakarta Struts, your applications should work more effectively and have fewer bugs. Just as important [more…]

Understanding Arrays in Java

An array is a set of variables that are referenced using a single variable name combined with an index number. Each item of an array is called an element. [more…]

Making Your Page Layouts Easier with Includes

A sample JSP page that is full of opportunities for refactoring — rewriting portions of code to make the resulting code simpler, more readable, and more efficient — is shown in Listing 1. [more…]

What Is Java, and Why Is It So Great?

Java is a programming language in the tradition of C and C++. As a result, if you have any experience with C or C++, you'll find yourself in familiar territory often as you learn the various features of [more…]

Refining Your Understanding of Classes and Objects

When you program in Java, you work constantly with classes and objects. These two ideas are really important.
Close your eyes for a minute and think about what it means for something to be a chair. [more…]

The Life Cycle of a Java Object

As you work with objects in Java, understanding how objects are born, live their lives, and die is important. This topic is called the life cycle of an object, and it goes something like this: [more…]

Building Custom Code with Java API for XML Binding (JAXB)

You can build customized code with JAXB — the Java API for XML Binding. With JAXB, you take an XML document and you make a Java class file that's perfect for processing the document. When your needs change [more…]

Looking at the Architecture of Enterprise JavaBeans

Everyone is talking about Enterprise JavaBeans (EJBs). Perhaps your business is planning to implement an EJB application, or perhaps you want to discover more about this technology for personal enrichment [more…]

Parsing XML Events with SAX

The word event conjures up all kinds of images. For a nonprogrammer, an event is just "something that happens." If you're used to dealing with windows and frames in Java, then you probably think of an [more…]

Knowing Why Java and XML Mesh

Java and XML are the foundations of a new generation of applications and Web services. In case you're not convinced that both XML and Java enjoy cross-platform portability, look over these facts about [more…]

Working with Related Classes in Java

Many of the classes you'll see in Java have created objects that stand on their own. However, the real power of object-oriented programming lies in its ability to create classes that describe objects that [more…]

Designing the View in Jakarta Struts

If you want your application's users to see your beautiful work, you need to create a visual component for your application. In the Struts implementation of the MVC pattern, you have complete flexibility [more…]

Taking the Document Object Model (DOM) Approach to XML Documents

The dichotomy between linear thinking and holistic thinking separates (respectively) SAX from DOM.
SAX (Simple API for XML) treats an XML document linearly, working through a document piece by piece, from [more…]

Singling Out Stateless Session Beans in Enterprise JavaBeans

Stateless session beans — EJBs that complete a task in a single step — are arguably the simplest of all EJB components. They make minimal demands on the EJB component developer and are used to implement [more…]

Delving Into the Enterprise JavaBeans Deployment Descriptor

Two major versions of Enterprise JavaBeans (EJB) deployment descriptors are currently in circulation. The EJB 1.1 deployment descriptor describes the structure and assembly of EJB applications built to [more…]

Analyzing Performance in Enterprise JavaBeans

Analyzing performance is probably one of the most complex tasks in designing any application. It's an imprecise science because there are many factors that come into play. These are augmented in Enterprise [more…]

Java Keywords

The 50 Java keywords have specific meanings within the language, so you can’t use the keywords in this table for anything other than their function within Java. And, you can't make up new meanings for [more…]

Java For Dummies Cheat Sheet

When building a website with Java you need to know the Java keywords — those programming words, phrases, and nonsense terms that have specific meaning in the Java language, and that get it to do its thing [more…]

Beginning Programming with Java For Dummies Cheat Sheet

As you start programming with Java, it pays to become familiar with the Java keywords as quickly as possible. These keywords have very specific and very helpful meanings within the language. You can’t [more…]

Searching for Text in Eclipse

As your Eclipse project gets larger and more complex, being able to find specific snippets of Java code easily becomes important. Luckily, Eclipse offers you multiple ways to search for text in your Java [more…]

Dealing with Javadoc Comments in Eclipse

When you use Eclipse to write Java code, don't forget to edit the Javadoc comments (the things that start with /**). You can add useful information when you edit the Javadoc comments, and as you edit them [more…]

Getting Help from Eclipse

With both the complexity of Java and the nuance of Eclipse, you can't be expected to remember everything. Sometimes, you need a little more help from Eclipse to get your programming going. Luckily, Eclipse [more…]

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…]

Writing Primitive Data Types

Java data types are the kind of data you can store in a variable. Primitive datatypes are defined by the language itself. Java defines a total of eight primitive types. Of the eight primitive data types [more…]

Math and NumberFormat Classes

Java classes lay the foundation for your programs. The Java Math and NumberFormat classes let you program number values, as well as format numbers and currencies. [more…]

Using Java Operators

An operator designates a mathematical operation or some other type of operation that can be performed on operands.Java has arithmetic operators, relational operators [more…]

Writing Common Java Statements

Java statements build programs. Every Java class must have a body, which is made up of one or more statements. You can write different kinds of statements, including declaration and expression. [more…]

Java All-in-One For Dummies Cheat Sheet

Writing Java statements (like for and if) and classes (like Math and NumberFormat) help you start and build strong programs. Variables hold different kinds of Java data types: numbers, characters, and [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…]

Create an Abstract Class in Java

An abstract class in Java is a class that contains one or more abstract methods, which are simply method declarations without a body — that is, without executable code that implements the class or method [more…]

How to Use the javac Command

The javac command in Java compiles a program from a command prompt. It reads a Java source program from a text file and creates a compiled Java class file. The basic form of the [more…]

Methods and Method Declaration in Java

A method in Java is a block of statements that has a name and can be executed by calling (also called invoking) it from some other place in your program. Along with fields, methods are one of the two elements [more…]

What Are Objects in Java Programming?

Object-oriented programming is a type of computer programming — such as Java — based on the premise that all programs are essentially computer-based simulations of real-world objects or abstract concepts [more…]

What Is the Life Cycle of an Object in Java?

One topic that’s important to know about when you work with object-oriented programming in Java is the life cycleof an object. How objects are born, live their lives, and die is important. In Java, the [more…]

How Operators Work in Java

An operator in Java is a special symbol or keyword that’s used to designate a mathematical operation or some other type of operation that can be performed on one or more values, called [more…]

How to Use a Package Statement in Java

The package statement identifies the package that a Java program belongs to. If your program does not include a package statement, the program belongs to the [more…]

Polymorphism in Java

Polymorphism is a fancy computer science term that refers to Java’s ability to use base-class variables to refer to subclass objects, keep track of which subclass an object belongs to, and use overridden [more…]

What Is Recursion in Java Programming?

Recursion is a basic programming technique you can use in Java, in which a method calls itself to solve some problem. A method that uses this technique is [more…]

Reference Types in Java

A reference type is a data type that’s based on a class rather than on one of the primitive types that are built in to the Java language. The class can be a class that’s provided as part of the Java API [more…]

Shadowed Classes or Variables in Java

Shadowing refers to the practice in Java programming of using two variables with the same name within scopes that overlap. When you do that, the variable with the higher-level scope is hidden because the [more…]

How Statements Are Used in Java

Unlike most programming languages, Java doesn’t use statements as its fundamental unit of code. Instead, it gives that honor to the class. However, every class must have a body, and the body of a class [more…]

What Is the Static Keyword in Java?

In Java, a static member is a member of a class that isn’t associated with an instance of a class. Instead, the member belongs to the class itself. As a result, you can access the static member without [more…]

Switch Statements in Java

A switch statement is useful when you need to select one of several alternatives based on the value of an integer, a character, or a Stringvariable. The basic form of the [more…]

How to Use the Java Keyword this

The keyword this in Java refers to the current class instance. For example, if a class defines a method named Calculate, you can call that method from another method within the same class like this: [more…]

Try Statements in Java

A try statement is used to catch exceptions that might be thrown as your program executes. You should use a try statement whenever you use a statement that might throw an exception That way, your program [more…]

How to Use While Statements in Java

A while statement in Java programming creates a loop that executes continuously as long as some conditional expression evaluates to true. The basic syntax is this: [more…]

Java's ArrayList Class

The ArrayList package (Package: java.util) in Java lets you create and maintain a special type of collection object: an array list. An array list is similar to an array but averts many of the most common [more…]

Use Array Lists in Java

To create an array list in Java, you declare an ArrayList variable and call the ArrayList constructor to instantiate an ArrayList object and assign it to the variable: [more…]

Arrays Class in Java

The Arrays class (package: java.util) provides a collection of static methods that are useful for working with arrays. Because the Arrays class provides only static methods, it has no constructors. [more…]

Increment and Decrement Operators in Java

Increment (++) and decrement (--) operators in Java programming let you easily add 1 to, or subtract 1 from, a variable. For example, using increment operators, you can add 1 to a variable named [more…]

What Is Inheritance in Java?

Inheritance refers to a feature of Java programming that lets you create classes that are derived from other classes. A class that’s based on another class [more…]

What Is an Initializer in Java?

An initializer is a line of code (or a block of code) placed outside any method, constructor, or other block of code. Initializers are executed whenever an instance of a class is created, regardless of [more…]

Integer Data Types in Java

An integer is a whole number — that is, a number with no fractional or decimal portion. Java has four integer types, which you can use to store numbers of varying sizes. [more…]

What Is an Interface in Java ?

An interface in Java is similar to a class, but the body of an interface can include only abstract methods and final fields (constants). A class implements [more…]

Local Variables in Java

A local variable in Java is a variable that’s declared within the body of a method. Then you can use the variable only within that method. Other methods in the class aren’t even aware that the variable [more…]

Logical Operators in Java

A logical operator (sometimes called a “Boolean operator”) in Java programming is an operator that returns a Boolean result that’s based on the Boolean result of one or two other expressions. [more…]



No comments:

Post a Comment

Pages