Java programming part-9

JIT Compiler :-


The full form of JIT is Just-In-Time. It is a part of the Java Runtime Environment (JRE).

The JIT compiler is one that converts language bytecode into machine instruction (PR).

Movie Just-in-time means that the bytecode is compiled. Improve the performance of multiplication better at run-time.

Java programming part-8

Javascript vs Java :-

Javascript is going to be renamed as Java which is a part of the win.

The difference in conflict is:-

JavaScript vs Java

1:-JavaScript is an OOP scripting language whereas Java is an OOP programming language.

2:-JavaScript runs only in the browser while the Java code runs in both the JVM and the browser.

3:-JavaScript code is not easy and complicated whereas Java code is complicated and difficult.

4: – JavaScript is used to create dynamic web pages with HTML while Java is used to create stand alone and live applications using applet.

5: – It can be run in the browser without compiling it, whereas we have to compile the Java code.

6: – JavaScript supports more platforms than Java.

7:- Objects of Java are based on classes while those of JavaScript are based on prototypes.

8:- JavaScript is dynamic typed language whereas Java is static typed language.

9:-JavaScript is not a stand-alone language, it is used with HTML, while Java is a stand-alone language, it does not require any other language.

Java programming part-7

Java bean :-

A java bean is a Java class that encapsulates many objects into a single object, this object is called a bean. The class of java bean is written in Java language.

The Java class that is there is reusable i.e. it can be used many times. Java Bean was developed by Sun Microsystems.

The Java Bean is a general-purpose component model.

Java Bean has the following properties:-

1:-Java bean class has no-arg constructor. 2:- It uses getter and setter functions.

3:-Java Bean is Serializable. Example of java bean:-

advantage of java bean in hindi:-

Java Bean has the following advantages:-

1:- Follows the property of Java Bean (Write once and run anywhere).

2:-Java Bean program can work in different local platform.

3:-Java Bean is platform independent, it gets run everywhere.

4: – You can easily configure Java Bean.

5: – The properties, events, and methods of Java Bean can be controlled.

6: – Configuration setting in Java Bean can be saved in persistent storage and it can be restored later.

Java programming part-6

Memory Allocation :-

Memory allocation is the allocation of systems to a procedural computer.

Adjectives of two types:-

1:- Static Memory Allocation

2:- Dynamic memory allocation

  • static memory allocation

Compile time in static memory allocation

It will turn right once it is set at the appointed time. !

Stacks and heaps.

memory allocation

  • dynamic memory allocation

That process is called dynamic memory allocation to the memory runtime.

This allocation is implemented by the data segment.

Java programming part-5

Life cycle of Apple

Applet is a Java program that runs in a web browser. Whenever an applet is created, it passes through 5 states. Applet’s life cycle consists of 5 states and 5 methods.

  • :-Initial state:-

When a new applet is created, it is activated through init() method. The applet is initialized only once in its life.

Its syntax is as follows:-

Public Void init()

{

//action

}

  • :-Running State:-

When start() method is to be called then running is starting. This is the updated status of the applet.

The short sentence structure is as follows:-

public void start()

{

//Work

}

  • : – Idle state: –

When call the stop() method. This is the state of the applet. This method can be called many times.

The short sentence structure is as follows:-

public void stop()

{

//Work

}

  • :-Dead state:-

This state starts when destroy() method is called. In this state the applet is removed from memory forever. This is the fourth state of the applet. This state is executed only once.

Its syntax is as follows:- Public void destroy()

{

//action

}

  • :-Display state:-

This state is obtained when we call the paint() method. This method can be called multiple times.

Its syntax is as follows:-

Public void paint()

{

//action

}

Program for life cycle of applet:-

Applet program

Java programming part-4

features of java:-

  • Object-Oriented:-

Java is a pure object-oriented programming language, that is, procedures are not used in it, but it is only a language based on objects.

  • Platform Independent:-

Java is platform independent language that means it can run in any platform. This feature does not suit any other language as much as it does Java. Java is platform independent language because in Java the source code is compiled into intermediate code which we call byte code and every system that has JVM interprets the byte code.

  • Secure:-

The third big feature of Java is that it is a secure language. Java is the most secure because Java programs run in the java runtime environment. Java uses public key encryption and Java applications are accessed in a secure encrypted form on the Internet

  • Compiled and Interpreted:-

In Java the source code is compiled into byte code and then it is interpreted by JVM into machine code.

  • Simple, Small and Familiar:-

Java is an easy language because it has syntax similar to c++ which can be learned easily.Joint operator overloading (loading when done) header files is not used.

  • Portable:-

Java is a portable byte code is suitable for everyone so it is a portable; infection can be acquired.

Your message allocation is there to collect garbage in Java. Java advice from all of these is strong.

  • Strong:-
  • Distributed:-

Java is a distributed language which means that Java programs are designed to run in the Internet and HTTP and FTP protocols are used in Java so that they can be easily accessed in the Internet.

  • Multi threaded:-

Multi threading is used in Java, that is, in Java, the program is divided into smaller sub-programs and these sub-programs are executed sequentially.

Java programming part-3

JVM(java virtual machine) :-

The full name of JVM is Java Virtual Machine. JVM is a virtual machine that provides a runtime environment. JVM converts the byte code into native machine code and finally executes the native machine code in Java program. JVM executes the program and generates the output. JVM is platform independent.

JRE(java runtime environment):-

The full name of JRE is java runtime environment. JRE is also called java runtime. JRE is a part of JDK (java development kit). JRE is a set of software tools for developing Java applications.

The JRE consists of a set of class libraries and other files, which the JVM uses at runtime, and also contains the JVM. If you want to run any Java program in the system, you need to install JRE. JRE was developed by Sun Microsystems.