Saturday, August 11, 2012
0
Download java
Java is a object oriented programming language developed by Sun Microsystem of USA in 1991.The goal is to make a simple language ,portable and reliable.Java team included existing programming features like C and C++ but they removed number of features of C and C++ that they consider aas source of problems and thus made java really simple,portable,reliable.Java has different milestone from90's.Java include many features their aim is to design a language which could offer solution to some of the problems encountered in modern programming.
JAVA and C:
class Program1
{
public Static void main(String args[])
{
System.out.println("Sharealltricks"); // Display the string.
}
}
NOTE:
Class Declaration:
Class Program1
We must declare a class it is an object oriented language and hence all must be declare inside the class.
Class definition begins with brace [{ ] and ends with a closing [}] in the case of c++ we use [;] semicolon
Main Line:
This is similar to main() function in c++ Every java program must include the main() method.This is the atarting point for the interpreter to begin the execution java can have more number of classes but it 1 of them should be a main.
"public static void main(String args())"
Finally the System.out.print it is the output statement this is similar to cout<sharealltricks statement
Learn Java Chapter 1
Download java
Java is a object oriented programming language developed by Sun Microsystem of USA in 1991.The goal is to make a simple language ,portable and reliable.Java team included existing programming features like C and C++ but they removed number of features of C and C++ that they consider aas source of problems and thus made java really simple,portable,reliable.Java has different milestone from90's.Java include many features their aim is to design a language which could offer solution to some of the problems encountered in modern programming.
- Dynamic and Extensible
- Perfomance
- Distributed
- secured
- Object-Oriented
- Compile and Interpreted
- Simple
- Multithreaded
- Intractive
JAVA and C:
- Java does not contain the data types struct and union
- Java does not support explict pointer type
- we cannot use #define,#include statements
- Java add new operator such as instanceof and >>>
- Java adds Break and Continue statement
- Java does not have pointers
- Java does not support operator overloading
- Java does not have template classes
- We cannot use #include statements
- We have to use finalize()function instead of destructor
- Standalone
- Web applets
- Compling the bytecode using javac program name.java
- Executing the bytecode program java program name
class Program1
{
public Static void main(String args[])
{
System.out.println("Sharealltricks"); // Display the string.
}
}
NOTE:
- Java is case sensitive
- Class name and the file name should be same Here the file name should be given as Program1
Class Declaration:
Class Program1
We must declare a class it is an object oriented language and hence all must be declare inside the class.
Class definition begins with brace [{ ] and ends with a closing [}] in the case of c++ we use [;] semicolon
Main Line:
This is similar to main() function in c++ Every java program must include the main() method.This is the atarting point for the interpreter to begin the execution java can have more number of classes but it 1 of them should be a main.
"public static void main(String args())"
Finally the System.out.print it is the output statement this is similar to cout<
Subscribe to:
Post Comments (Atom)
Post a Comment