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.
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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 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…]
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…]
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…]
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…]
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…]
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…]
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…]
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
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…]
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…]
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…]
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…]
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…]
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…]
Java has two operators for performing logical And operations:
& and
&&. Both combine two Boolean expressions and return
true only if both expressions are
[more…]
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…]
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…]
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…]
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…]
In Java programming, a class is defined by a
class declaration, which is a piece of code that follows this basic form:
[more…]
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…]
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…]
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…]
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 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…]
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
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…]
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…]
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…]
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…]
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…]
The
java command runs a Java program from a command prompt. The basic syntax is
[more…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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…]
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 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…]
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…]
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…]
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…]
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…]
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…]
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