Java Programming Tutorials

Java Programming Tutorials And Articles
  Title / Author Replies
Growing an Array in Java Suppose you have an array of some type that is full, and you want to grow it. Employee a = new Employee; // array is full int newLength = a.length * 11 / 10 + 10; Employee newArray = new Employee; System.arraycopy(a, 0, newArray, 0, a.length); a = newArray;That...
Drawing Lines The drawLine method belongs to the Graphics class. This example draws a fan of twenty lines from the bottom center of the Applet along the top edge. The applet's getSize method is used to find the dimensions of the applet. import java.awt.*; import java.applet.*; public...
What Is GlassFish? Depending on how you look at it, GlassFish is any of the following: A community. The GlassFish community currently includes over 1100 members participating in the GlassFish project, with the objective of developing an open source application server that implements Java EE...
Introduction Handling character strings in Java is supported through two final classes: String and StringBuffer. The String class implements immutable character strings, which are read-only once the string has been created and initialized, whereas the StringBuffer class implements dynamic...
Introduction A pattern of special characters is used to specify the format of the date. The example below demonstrates some of the characters. For a complete listing, see the javadoc documentation for the SimpleDateFormat class. Note: This example formats dates using the default locale...
Automatic Conversion In Java type conversions are performed automatically when the type of the expression on the right hand side of an assignment operation can be safely promoted to the type of the variable on the left hand side of the assignment. Thus we can safely assign: byte -> short -> int...
An Applet is a small program that can be sent across the Internet and interpreted on a client machine. To give permission for remote access it must be a public class. Typically it is a class that inherits and/or defines a special set of functions needed to run an applet. These are part of the class...
Java has a class called File, which actually represents not a file you can read or write, but rather a filename. Using this class is highly recommended instead of simple strings, because it makes your file naming operating-system independent. You can easily find out wether a filename is relative or...
Java, has become now undoubtedly the fuel of the development of the Software System Technology.Developers, now thus take the challenge to prove the feelings of Java as the best positive catalyst of their development life's reactions.They feel the Class, as the ultimate classic sense of the...
Here is a file splitter made in java . try it with files. Don't try it with directory. It will not respond in the way u want. Splitter class import*; class Splitter { public static void main(String args) throws IOException { takeInput(args);
Java program for zipping.Download the file given as attachment. unzip the file and store it in any folder in ur hard-drive.... go to command prompt.... set the classpath properly. C:\Zipper\ C:\Zipper>set classpath=. then type