|
List of Free SCJA Articles from Ucertify.com |
|
|
Written by Roger Stuart
|
|
Page 8 of 9
All arrays in Java have a public final field known as length. This
field is used to find the number of elements that the array holds. Once
an array is created, its size can be obtained by using the length field
qualified by the array name along with a dot operator. For example, the
given... [read more..]
The -d option of the Java compiler, javac, specifies the path for
storing class files in a directory other than the root directory. By
default, class files are stored in the location in which the
corresponding Java source files are stored. The path is set at the
command prompt as given below:... [read more..]
The switch statement is a multiway branch statement. The general form of the switch statement is given below:
switch(expression) {
case value1://statements
break;
case value2://statements
break;
.
.
default:
//default statements
}
The expression must be of int, char, byte,...
[read more..]
The fillArc() method is used to draw a filled arc. It belongs to the Graphics class. The syntax of this method is as follows:
void fillArc(int top, int left, int width, int height, int startAngle, int sweepAngle)
The arc is bounded by a rectangle whose upper-left corner is defined by top...
[read more..]
The startsWith() method of the String class checks whether a given
string starts with a specified string or not. It returns boolean true
if the string matches, otherwise returns false. The general form of
this method declaration is as follows: boolean startsWith (String str)
Here, str... [read more..]
The setLength() method of the StringBuffer class sets the length of the
buffer within the StringBuffer object. Its general form is as follows:
void setLength(int len) Here, len specifies the length of the new
buffer. Its value should be always non-negative. If the size is set to
a value... [read more..]
An Enterprise JavaBeans(EJB) container is an environment for EJB components to run.
It provides system level services such as transaction, security, and persistence management to the beans deployed into it.
Note: The container provides an interface between a component and low level...
[read more..]
A deployment descriptor is an XML document with a .xml extension. It
defines a component's deployment settings. It declares transaction
attributes and security authorization for an enterprise bean. The
information provided by a deployment descriptor is declarative and
therefore it can be modified... [read more..]
Boolean logical operators operate on boolean operands. They combine two
boolean values and return a boolean value as a result. The table below
shows some boolean operators and the result they respectively produce.
In the above table, A and B are boolean variables. [read more..]
JavaScript is a language that is used to make the Web pages
interactive. The user can send and receive information with the use of
JavaScript objects. JavaScript can be used to create image rollovers
and validating forms. It can also be used to open a new browser window.
It is placed in the HTML... [read more..]
|