What is a Java. How to Write a basic Program in a Java.
Java is a High level Programming Language. Java was invented by the James Gosling. James Gosling is a known as father of the java. Java was launched by the Sun Microsystems company in a USA in a 1995. Java was initially is a known as Oak but In a 1995 Oak was renamed Java. Syntax of Java is similar to the C++ and C Language.
![]() |
- Key points of Java :-
- Java is a Object Oriented based Programming Language.
- Java code is a run on a Java Virtual Machine.
- Java is a Secure and Robust Programming Language.
- Java is a both Compiled and Interpreted Programming Language.
- Java is a Case sensitive Programming Language.
- Java is not a Platform dependent and Portable Programming Language.
- Java is a Dynamic and Extensible Programming Language.
- Java is a High Performance Programming Language.
- Java is a Distributed Programming Language.
- Java is a Multithreaded and Interactive Programming Language.
- List of the Java Development Kit :-
- appletviwer :- appletviwer is used for the viewing Java applets.
- javac :- Javac is a used for the compile the code in a Java program.
- java :- It is a used for the Java Interpreter.
- javap :- It is a used for the Java disassembler.
- javah :- It is used for C header files.
- javadoc :- It is a used for creating HTML documents.
- jdb :- It is a used for Java debugger.
- Compiled and Interpreted :- Generally a Programming Language is a either Compiled or Interpreted but Java is a combination of both Compiled and Interpreted Due to the Compiled and Interpreted method Java has two step system. First step Java Complier translate source into the bytecode. Second step Java interpreter generates machine code that can be directly executed by the machine that is running the Java Program.
- Platform-independent and Portable:- The most important features in Java are that Java can be easily ported to any computer system anywhere and anytime. If any Changes occur in a computer operating system will not effect on a Java program.
- Object - Oriented :- Object Oriented is a method to represent the real world entity with help of Programming.
Object Oriented Concept :-
- Classes
- Object
- Inheritance
- Polymorphism
- Data Hiding
- Encapsulation
- Abstraction
- Robust and Secure :- Java is a Robust and Secure Programming Language because of this Java provides security and reliable code. It is a remove the garbage collection. It is a manage the all memory problem. It's protect from the viruses.
- Distributed :- Java is a distributed programming language. it is used to create applications over a network. It is a also used for share the data and Programs.
- Multithreading and Interactive :- It is used for to handle the multiple tasks at the same time. For example playing game and listening music at the same time.
- High Performance :- Java is a high Performance Programming Language.It is a enhance the process of any application.
- Simple :- Java is a Simple Programming Language and Java is a Similar to the C++ and C Language.
- Dynamic and Extensible :- Java is a dynamic and extensible Programming Language. Java is a ability to dynamically linking in new class library.
Basic Program of a Java :-
public class Mydemo {
public static void main(String args[ ]) {
System.out.println("Welcome to tecscholar");
}
}
Data types in a Java :- Data types is a types of data which store in a variable. Data Types can be different size and different values.
- Types of Data types :-
- Primitive Data types.
- Non Primitive Data types.
Non Primitive Data types :- Non Primitive Data types is a Data types which is a drive from the primitive Data types is known as Non Primitive Data types. for example Array, String, Stack,Queue etc.
Variable in a Java :- Variable is used for to Store the data. Variable Store the data for the temporary time.
Types of Comment:-
- Single Line Comment
- Multi Line Comment
Multi Line Comment :- Those Comment in a multiple sentence is a known as a Multi Line Comment. Multi Line Comment is a denoted by the (/*...............*/).
Difference between Java and C++.
Java | C++ | |
---|---|---|
Java is a not supports overloading Method. | C++ Programming Language is a support the overloading Method. C++Programming Language is a support the multiple inheritance. C++ Programming Language is a support the global variables method. C++ Programming Language having a pointers. C++ Programming Language having a header files. For example #include<iostream.h>. C Language is a Subset of C++ Programming Language. C++ Programming Language having no interface method. | |
Java is not Support multiple inheritance. Java is not Support global variables. Java has no pointer method. Java has no header files. Java is not a superset and subset of any Programming Language. Java having a interface method. |
Advantages of a Java :-
- Java having a ability to collect the automatic garbage.
- Java is a highly Scalability Programming Language.
- Multithreading.
- More Secure
- It is used in Android application development.
- It is a easy to learn.
- Java is a any platform friendly Programming Language.
- It is a easy to maintain.
- Java is a not supports the low level Programming Language.
- Java is a not Support the Unsigned integers.
- Java has no control on own its garbage collection.
- Java is a more economical as compared to the other Programming Language for example it's tools are more economical.
- Java is a run in Java Virtual Machine (JVM) Hence it's consume more memory.
Comments
Post a Comment