Skip to main content

Posts

Showing posts from December 23, 2018

Native code

Java Programming Native code: Native code is computer programming (code) that is compiled to run with a particular processor (such as an Intel x86-class processor) and its set of instructions. If the same program is run on a computer with a different processor, software can be provided so that the computer emulates the original processor. The method is implemented in "native" code. That is, code that does not run in the JVM. It's typically written in C or C++. Native methods are usually used to interface with system calls or libraries written in other programming languages.

Byte Code:

Java Programming Byte Code: It is the unique characteristic property of the Java programming language. It is something like a normal text file. Therefore, it cannot be affected by virus. It is an intermediate between a human readable source and machine readable source. Byte codes are plate form independent. Therefore, JVM is plate form dependent to make Java programming plate form indepdent.  

JAVA VIRTUAL MACHINE

Java Programming Java Virtual Machine (JVM) is  the heart of  entire  Java program execution process. First of all, the .java program is converted into a .class file consisting of byte code instructions by the java compiler at the time of compilation. Remember, this java compiler is outside the JVM. This .class file is given to the JVM.                        Following figure shows the architecture of Java Virtual Machine Method Area  // Class Area: Class area is the logical memory block of JVM, which holds information about classes and interfaces. Static variables are treated as class variables, because they take memory from method area. The size of the method area shrinks and expands according to the size of the application.  Heap: In Java when an object or an array is created, memory is allocated to them from heap. The JVM th...

DIFFRENCE BETWEEN JAVA AND C++

Java Programming JAVA :- 1. Java is true Object oriented language. 2. Java does not support operator overloading. 3. It supports labels with loops and statement blocks . 4. Java does not have template classes as in C++. 5. Java compiled into byte code for the Java Virtual Machine. The source code is independent   on operating system. 6. Java does not support multiple inheritance of classes but it supports interface. 7. Runs in a protected virtual machine. 8 . Java does not support global variable. Every variable should declare in class. 9.  Java does not use pointer. 10. It Strictly enforces an object oriented Programming paradigm. C++ :- 1. C++ is basically C with Object-oriented extension. 2. C++ supports operator overloading. 3. It supports go to statement. 4. C++ has template classes. 5. Source code can be written to be platform independent C++ typically compiled into machine code. 6. C++ supports multiple inheritance ...

Features of Java

Java Programming Simple:           Learning and practicing java is easy because of resemblance with c and C++.  Object Oriented Programming Language:                                                                                      Unlike C++, Java is purely OOP.   Distributed: Java is designed for use on network;                                  ...

Concept of OOPS

Java Programming This are the basic concept of OOPS. 1. Object 2. Class 3. Data abstraction 4. Data encapsulation 5. Inheritance 6. Polymorphism 7. Dynamic binding Java Classes/Objects Java is an object-oriented programming language. Everything in Java is associated with classes and objects, along with its attributes and methods. For example: in real life, a car is an object. The car has  attributes , such as weight and color, and  methods , such as drive and brake. A Class is like an object constructor, or a "blueprint" for creating objects. Create a Class To create a class, use the keyword  Myclass.java Create an Object In Java, an object is created from a class. We have already created the class named  MyClass , so now we can use this to create objects. To create an object of  MyClass , specify the class name, followed by the object name, and use the keyword  new : Example=> public class Myclass{ int x=10;...

What is JAVA??

Java Programming What is JAVA? Developed by Sun Microsystems USA (James Gosling). A general purpose object oriented language. Based on C & C++. Designed for easy web/internet application. Widespread acceptance. Java is a general-purpose, object-oriented programming language developed by Sun Microsystems of USA in 1991.                                                         Originally called Oak by James Gosling (one of the inventor of the language). Java was invented for the development of software for consumer electronic devices like TVs, Washing- machine, microwave oven etc. The main aim had to make java simple, portable and reliable.  Introduction:   Java is a high-level, third gener...
Java Programming