Tuesday, July 27, 2010
features of java
- Platform Independence
- The Write-Once-Run-Anywhere ideal has not been achieved (tuning for different platforms usually required), but closer than with other languages.
- Object Oriented
- Object oriented throughout - no coding outside of class definitions, including main().
- An extensive class library available in the core language packages.
- Compiler/Interpreter Combo
- Code is compiled to bytecodes that are interpreted by a Java virtual machines (JVM) .
- This provides portability to any machine for which a virtual machine has been written.
- The two steps of compilation and interpretation allow for extensive code checking and improved security.
- Robust
- Exception handling built-in, strong type checking (that is, all data must be declared an explicit type), local variables must be initialized.
- Exception handling built-in, strong type checking (that is, all data must be declared an explicit type), local variables must be initialized.
- Several dangerous features of C & C++ eliminated:
- No memory pointers
- No preprocessor
- Array index limit checking
- Automatic Memory Management
- Automatic garbage collection - memory management handled by JVM.
- Automatic garbage collection - memory management handled by JVM.
- Security
- No memory pointers
- Programs runs inside the virtual machine sandbox.
- Array index limit checking
- Code pathologies reduced by
- bytecode verifier - checks classes after loading
- class loader - confines objects to unique namespaces. Prevents loading a hacked "java.lang.SecurityManager" class, for example.
- security manager - determines what resources a class can access such as reading and writing to the local disk.
- Dynamic Binding
- The linking of data and methods to where they are located, is done at run-time.
- New classes can be loaded while a program is running. Linking is done on the fly.
- Even if libraries are recompiled, there is no need to recompile code that uses classes in those libraries.
This differs from C++, which uses static binding. This can result in fragile classes for cases where linked code is changed and memory pointers then point to the wrong addresses.
- Good Performance
- Interpretation of bytecodes slowed performance in early versions, but advanced virtual machines with adaptive and just-in-time compilation and other techniques now typically provide performance up to 50% to 100% the speed of C++ programs.
- Interpretation of bytecodes slowed performance in early versions, but advanced virtual machines with adaptive and just-in-time compilation and other techniques now typically provide performance up to 50% to 100% the speed of C++ programs.
- Threading
- Lightweight processes, called threads, can easily be spun off to perform multiprocessing.
- Can take advantage of multiprocessors where available
- Great for multimedia displays.
- Built-in Networking
- Java was designed with networking in mind and comes with many classes to develop sophisticated Internet communications.
features of .net
There are various features of .NET. Some of them are mentioned below namely:
- Assemblies
- MSIL
- Common Type System
- Cross-language Interoperability
features of data structure
A data structure is a group of data elements grouped together under one name. These data elements, known as members, can have different types and different lengths. Data structures are declared in C++ using the following syntax:
struct structure_name {
member_type1 member_name1;
member_type2 member_name2;
member_type3 member_name3;
.
.
} object_names;
struct structure_name {
member_type1 member_name1;
member_type2 member_name2;
member_type3 member_name3;
.
.
} object_names;
features of c
The C programming model is that the programmer knows exactly what they want to do and how to use the language constructs to achieve that goal. The language lets the expert programmer express what they want in the minimum time by staying out of their way.
Sunday, July 11, 2010
Thursday, July 8, 2010
fibonic serise in c
#include
#include
void main()
{
int a=0,b=1,c,i;
clrscr();
printf("%d\n%d",a,b);
for(i=1;i<=5;i++)
{
c=a+b;
printf("\n%d",c);
a=b;
b=c;
}
getch();
}
Tuesday, July 6, 2010
Subscribe to:
Posts (Atom)