In this section we will discuss about the Java programs. This section will describe you the various Java programs that will help you understand how to create Java applications.
Simple Java Programs
In this section we will discuss about the Java programs
This section will describe you the various Java programs that will help you understand how to create Java applications. In this section you will find the examples as well as you will know about the various aspects of Java viz. what is Java, how to get Java, how to install Java, Java class, object and methods, Java variables, constants, and literal, Java identifier example, what is public static void main, Java first example, Java constructor, this keyword in Java, super keyword in Java, Java type casting example, Java array examples, Java Matrix example, Java switch statement example, Java for loop example, while loop in Java, do-while loop in Java, Java exception handling, how to read file in Java, how to write file in Java, how to copy file in Java, Java directory examples, how to create date in Java, Compressing the file into GZIP format, Java static method example, Java applet example.
Java is a programming language which follows the OOPS concept. It was developed by the Sun Microsystems but, it was acquired by the Oracle Corporation on January 2010. Java performs the both compile and interpret operation on code. It first creates a class file after compiling the code which runs on the JVM specification. Java was developed to make applications architecturaly independent. Java is derived from the C and C++ programming language.
To develop an application in Java you will need the JDK. You can download it from the following links :
- http://java.com/en/download/index.jsp.
- http://www.oracle.com/technetwork/java/javase/downloads/index.html.
Once you have downloaded the JDK it should be properly installed in your system. In this section you will read about how to install and configure Java on your machine. Before installing Java on your machine you should check whether any other version of Java is installed in your system or not. If so that it may generate problem while compiling your Java program.
Java class, object and methods
In this section we will read about the class, object and methods in Java. We will read about what are their meanings, why they are used, and what are there functions.
Java variables, constants, and literal
In this section we will read about the variables, constants and literals in Java. We will read about why are they are used in Java, how they are used in Java.
In this section we will read about the identifiers in Java, how they are used in Java.
What is public static void main in Java ?
In this section you will read about the public static void main method in Java, why public static void main method is used in Java, how public static void main is written in Java.
In this section you will read about how to create a first application in Java. This section will describe you how you create your first program. This page describes the basic level of programming that a beginner learner can learn how to write first program in Java.
In this section you will read about the Constructor in Java such as what is constructor, what is the signature of constructor in Java, what is the purpose of constructor in Java, what is the difference between constructor and method.
In this section we will read about this keyword in Java viz. what is this keyword in Java, why this keyword in Java, what is method chaining, how to use this keyword in Java.
In this section we will read about type casting in Java, what is type casting in java, why we need to type cast in Java, Java wrappers etc.
In this section we will read about array in Java. In this page you will find an example of array which demonstrate you how an array may be use.
In this section we will read about the matrix example in Java. This example will demonstrate you about implementation of two dimensional array in Java.
In this section we will read about switch statement in Java viz. how switch statement is used in Java, what is purpose of switch statement in Java.
0In this section we will read about the for loop in Java. In this section we will read how for loop may be used in programming.
1In this section we will read about the while loop in Java. This section describes you how to use while loop in Java, why while loop is used in Java.
In this section we will read about the do-while loop in Java. This section describes you about how to use do-while loop in Java, why the do-while loop is used in Java.
2In this section we will read about how to do exception handling in Java. In this page you will read about what is exception in Java, how the exceptions can be handled in Java,
3In this section we will read about how to read file in Java. This section will describe you all the steps for reading a file in Java.
In this section we will read about how to write file in Java. This section will describe you all the steps for writing a file in Java.
4In this section we will read about how to copy file in Java. This section will describe you all the steps for copying a file in Java.
Java directory examples
5In this example you will read about the Java directory examples like, how to create directory in Java, how to list files and folders in Java, how to delete a directory, etc.
In this section we will read about how to create date in Java. This section will describe you the use of java.util.Date class in Java.
6Compressing the file into GZIP format
This section describes you how to compress a file in Java. In this page you will find an example which demonstrate you about compressing a file in Java.
7In this section you will read about how to create a static method, how to invoke a static method, why to create a static method etc.
In this example we will read about the Java applet viz. what is applet in Java, how to create applet in Java, how to run applet in Java, how applet can be called in Java, etc.
8For more tutorial you can visit the link http://www.roseindia.net/java/beginners/index.shtml.