Posted by rahul on December 25, 2009
Question: What is Collection APIĀ in Java?
Answer:- The Collection of API Contains Classes and interfaces that support in collection of objects. Its a group of objects.As we know Its a group so we can say elements to those objects that exists in this group. Collections maintain reference to objects of type object. Classes and interfaces comes in this collections are flexible. Algorithms are important part of collection mechanism . Algorithms are defined as static within the Collections class.
There are few collection interface:
There are few collection classes:
HashSet , TreeSet ArrayList Linked List WAIT! There is more to read… read on »
Comments:
Filed Under: Java
Posted by rahul on December 19, 2009
Question: Abstraction In Java ?
Answer:- An essential element of object-oriented programming is abstraction. Humans manage complexity through abstraction. For example, people do not think of a car as a set of tens of thousands of individual parts. They think of it as a well defined object with its own unique behavior. This abstraction allows people to use a car to drive to the grocery store without being overwhelmed by the complexity of the parts that form the car. They can ignore the details of how the engine, transmission, and braking systems work. Instead they are free to utilize the object as a whole.
A powerful way to manage abstraction is through the use of hierarchical classifications. This allows you to layer the semantics of complex systems, breaking them into more manageable pieces. From the outside, the car is a single object. Once inside, you see that the car consists of several subsystems: steering, brakes, sound systems, seat belts, heating, cellular phone, and so on. In turn, each of these subsystems is made up of more specialized unites. For Instance, the sound system consists of a radio, a CD player, and a tap player. The point is that you manage the complexity of the car through the use of hierarchical abstraction. WAIT! There is more to read… read on »
Comments:
Filed Under: Java
Posted by rahul on
Question: What is Inheritance In Java ?
Answer:- Inheritance is the process by which one object acquires the properties of another object. This is important because it supports the concept of hierarchical classification. As mentioned earlier, most knowledge is made manageable by hierarchical classification. Without the use of hierarchies, each object would need to define all of its characteristics explicitly. However by use of inheritance, an object need only define those qualities that make it unique within its class. It can inherit its general attributes from its parent. Thus it is the inheritance mechanism that makes it possible for one object to be a specific instance of a more general case.
Most people naturally view the world as made up of objects that are related to each other in a hierarchical way, such an animals, mammals, and dogs. If you wanted to describe animals in an abstract way, you would say they have some attributes, such as size, intelligence and type of skeletal system. Animals also have certain behavioral aspects; they eat, breathe and sleep. This description of attributes and behavior is the class definition for animals. WAIT! There is more to read… read on »
Comments:
Filed Under: Java
Posted by rahul on
Question: What Is Polymorphism In Java ?
Answer :- Polymorphism is a feature that allows one interface to be used for a general class of actions. The specific action is determined by the exact nature of the situation. Consider a stack (Which is a last-in, first-out list).you might have a program that requires three types of stacks. One stack is used for integer value, one for floating-point values, and one for characters.
The algorithm that implements each stack is the same, even though the data being stored differs. In a non-object-oriented language, you would be required to create three different sets of stack routines, with each set using different names. However, because of polymorphism, in java you can specify a general set of stack routines that all share the same names. WAIT! There is more to read… read on »
Comments:
Filed Under: Java
Posted by rahul on December 17, 2009
Question: What Is Java Virtual Machine or JVM ?
Answer. The Java Virtual Machine Specification defines the JVM as :
An Imaginary machine that is implemented by emulating it in software on a real machine.Code for the JVM is stored in .class files, each of which contains code for at most one public class.
The Java Virtual Machine Specification provides the hardware platform specification to which you compile all Java technology code. This specification enables the Java software to be platform-independent because the compilation is done for a generic machine, known as the JVM.You can emulate this generic machine in software to run on various existing computer systems or implement it in hardware.
The Compiler takes the Java application source code and generates byte codes. Byte codes are machine code instructions for the JVM . Every Java technology interpreter, regardless of whether it is a Java technology development tool or a web browser that can run applets , has an implementation of the JVM.
The JVM specification provides concrete definitions for the implementation of the following :- WAIT! There is more to read… read on »
Comments:
Filed Under: Java
Posted by rahul on
Question: What Is Garbage Collection in Java Programming Language ?
Answer: Garbage Collection is automatic memory management.Its a case of resource management.
Many Programming Language Permit the Memory to be allocated dynamically at run-time.The Process of allocating memory varies based on the syntax of the language, but always involves returning a pointer to the starting address of a memory block.
After the allocated memory is no longer required the program or runtime environment should de-allocate the memory. In C,C++ and other languages, you are responsible for de-allocating the memory.This can be a difficult exercise at times,because you do not always know in advance when memory should be released.programs that do not de-allocate memory can crash eventually when there is no memory left on the system to allocate. These programs are said to have memory leaks.
The Java programming language removes you from the responsibility of de-allocating memory.It Provides a system -level thread that tracks each memory allocation.During idle cycles in the JVM, the garbage collection thread checks for and frees any memory that can be freed. WAIT! There is more to read… read on »
Comments:
Filed Under: Java
Posted by rahul on
Question: What Is Java Technology?
Answer. Java technology has made its presence felt just everywhere from desktop PC’s, Electronic Gadgets to Mobile Devices. This Application Environment was first released by Sun Micro systems in 1995. Initially it was called OAK. In the year 1995, it was coined as the Java programming language. Java Technology is:
- A Programming language
- A Development environment
- A Application environment
- A Deployment environment
The Syntax of the Java programming language is similar to C++ syntax.You can use the Java programming language to create all kinds of applications that you could create by using any conventional programming language.
As a development environment, Java technology provides you with a large suite of tools:
Comments:
Filed Under: Java