 |
| What is JAVA |
| Java is a high-level object-oriented programming language developed by the Sun Microsystems. Though it is associated with the World Wide Web but it is older than ...more » |
|
 |
| |
|
 |
| Java an Object Oriented Language |
| OOP stands for Object Oriented Programming. OOPs provide a better flexibility and compatibility for developing large applications. This is a technique us...more » |
|
 |
| |
|
 |
|
 |
| |
|
 |
| Data Types |
| Java variables are assigned a data type in one of four basic categories: Arithmetic ...more » |
|
 |
| |
|
 |
| Java Operators |
| Operators are used to manipulate primitive data types. In Java, there are six categories of operators.
...more » |
|
 |
| |
|
 |
| Control Structure |
| Control structure includes the looping control structure and conditional or branching control structure.
...more » |
|
 |
| |
|
 |
| Arrays |
| When many items of data of the same class or type have to be stored, it is more efficient to use an array than separate variables or objects. For example, i...more » |
|
 |
| |
|
 |
| Java Classes |
| Classes are the fundamental building blocks of a Java program. You can define an Employee class as follows: class Employee {...more » |
|
 |
| |
|
 |
| Java Constructors |
|
A java constructor has the same name as the name of the class to which it belongs. Constructor's syntax does not include a return type, since...more » |
|
 |
| |
|
 |
| Java Methods |
| A method is a group of instructions that is given a name and can be called up at any point in a program simply by quoting that name. For instance, ...more » |
|
 |
| |
|
 |
| Java Method Overloading |
| In Java it is possible to define two or more methods within the same class that share the same name, as long as their parameter declarations ar...more » |
|
 |
| |
|
 |
| Java Method Overriding |
| In a class hierarchy, when a method in a subclass has the same name and type signature as a method in its superclass, then the method in the su...more » |
|
 |
| |
|
 |
| Java Nested Classes |
|
In Java programming language, when a class is defined within another class then such a class is called a nested class. Nested classes are a f...more » |
|
 |
| |
|
 |
| Inheritance in Java |
|
Inheritance is the capability of a class to use the properties and methods of another class while adding its own functionality. An ex...more » |
|
 |
| |
|
 |
| Interfaces in Java |
| Interfaces are similar to abstract classes but all methods are abstract and all properties are static final. Interfa...more » |
|
 |
| |
|
 |
| Polymorphism in Java |
| Overloaded methods are methods with the same name signature but either a different number of parameters or different types in the parameter li...more » |
|
 |
| |
|
 |
| Exception Handling in Java |
| Exception handling is a very important yet often neglected aspect of writing robust software. When an error occurs in a Java program it usually...more » |
|
 |
| |
|
 |
| Catching Exceptions |
| To catch an exception in Java, you write a try block with one or more catch clauses. Each catch clause specifies one exception type that it is p...more » |
|
 |
| |
|
 |
|
 |
| |
|
 |
| The throws clause |
| As you may have guessed from the examples above, the Java language requires that a method declare in a throws clause the exceptions that it ma...more » |
|
 |
| |
|
 |
|
 |
| |
|
 |
| The finally clause |
| Once a Java virtual machine has begun to execute a block of code -- the statements between two matching curly braces -- it can exit that block i...more » |
|
 |
| |
|
 |
| Applets in Java |
| An applet is a small program that is intended to be embedded inside another application such as a browser. The JApplet class must be the superc...more » |
|
 |
| |
|
 |
| Running an Applet |
| We need to use html code to run applets. The minimum html required to run applet with a browser (java host) is as follows: ...more » |
|
 |
| |
|