Posts

Showing posts from June, 2022

Difference between JRE,JDK,JVM Java programming language

 Go to the following page if you want to learn more about the Java Virtual Machine in depth. Let's look at the distinctions between the JDK, JRE, and JVM first. JVM JVM stands for Java virtual machine, which is a standard that offers a runtime environment in which Java byte code can be executed, i.e. it is an abstract concept whose implementation is independent of the methodology used, and it has been offered by Sun and other firms. It is the JVM that is in charge of transforming byte code into machine-specific code. It can also run applications written in other languages that have been compiled into Java bytecode. The JVM is responsible for the following tasks: Code is loaded, verified, executed, and a runtime environment is provided. JRE JRE stands for Java Runtime Environment, which is the implementation of JVM, i.e., the specifications given in JVM are implemented and a corresponding environment for execution is created. JDK The Java Development Kit (JDK) contains all of the to...

Java program compilation and execution

Image
 Java Program Compilation and Execution Because Java is a platform-independent programming language, it cannot be compiled in a single step. Instead, it uses a two-stage execution process, with the first phase taking place in an OS-independent compiler and the second in a virtual machine (JVM) that is custom-built for each operating system. The following are the two major stages: Compilation is the first principle. The source '.java' file is first run via the compiler, which converts the source code into Bytecode, a machine-independent format. Each class in the source file has its own '.class' file containing its contents. The compiler performs the following steps when transforming source code to bytecode: Step 1: Parse: Reads a collection of *.java source files and converts the token sequence into a string. Step 2: Symbols for the definitions are entered into the symbol table. Step 3: Process annotations: Processes annotations found in the given compilation units if th...

Features of Java

 The following are some of Java's most significant features: Object-Oriented Design- Everything in Java is an Object. Because it is built on the Object model, Java can be easily extended. Platform-unaffected- Unlike many other programming languages, such as C and C++, Java is compiled into platform-independent byte code rather than platform-specific machine code. This byte code is distributed over the internet and is interpreted by the Virtual Machine (JVM) on the platform on which it is run. Simple- Simple Java was created with the goal of being simple to learn. It should be simple to master if you understand the fundamental concepts of OOP Java. Secure- Java's secure feature enables the creation of virus-free and tamper-proof systems. Public-key encryption is used in authentication systems. Architecture-neutral- With the inclusion of the Java runtime system, the Java compiler generates an architecture-neutral object file format, which makes the compiled code executable on a w...

History of Java

 A Short History of Java The story of Java can be traced to early 1991 when a team of engineers led by James Gosling, at Sun Microsystems was formed to explore opportunities in the consumer electronics market. This effort was eventually referred to as the “Green” project. The aim of the project was to build a distributed system that would allow consumer electronic devices to talk to each other in a heterogeneous network as a business product that they can sell as modern software technology to consumer electronics’ manufacturers. The engineers of the Green project started with C++ as their choice of language. However, in order to accommodate the consumer market’s demand for CPU flexibility, they wanted to make the development a more platform-neutral process, and this required extending the C++ compiler. Eventually, however, they realized that even with lots of extras, C++ would not suffice, not to mention that C++ is a complex language in its own and current form. This has lead to t...

What is java?

Java is a platform as well as a programming language. Java is a high-level programming language that is also robust, object-oriented, and secure. Java was created in 1995 by Sun Microsystems (which is now a division of Oracle). The founder of Java, James Gosling, is recognized as the "Father of Java." It was known as Oak before Java. Because Oak was already a recognized business, James Gosling and his team decided to alter the name to Java. Platform: A platform is any hardware or software environment in which a program runs. Java is referred to as a platform because it has a runtime environment (JRE) and API. Exercising Java Let's take a look at an example of Java programming. The next page has a full discussion of the Hello Java example. Simple.java class  Simple{        public   static   void  main(String args[]){        System.out.println( "Hello Java" );      ...