Posts

Showing posts from July, 2020

Modifier's, Variable's in Java.

Modifier's in Java- Modifier's are keywords that you add to those defination's to change, modify or specify their meaning there are two major types of modifiers in java. Access Non-access Access modifiers are- Public- Visible to all. Private- visible to class only. Protected- Visible to the package and all sub-class. Default- Visible to the package. Non-access modifier are- Static- The static modifier for calling methods and variables without an object to which it belongs. Final- The final modifier for finalizing the implementation of classes ,methods and variables. Abstract- Abstract modifier for creating abstract classes and methods. Synchronized and volatile- The synchronized and volatile modifiers which are used for threads.  Variable's- Variables are memory locations which are reserved to store values. This implies while declaring a variable you reserve some memory. when you want to use a variable in a program, we should declare it.          int x; Here we decl

What is JVM,JRE,JDK ?

What is JVM? JVM stands for Java Virtual Machine. JVM is the virtual machine that runs under the java bytecode. The JVM doesn't understand the java source code that is why you compile your ".java" files to obtain ".class" files that contains the bytecode understood by the JVM. The same bytecode gives the same results makes java program platform independent language. The main advantage of java program is write the code once and run it anywhere.(i.e run in any operating system like windows,Linux,Mac..) let's try to understand the work of JVM- we write the code in any text-editor,save your program in ".java"(Ex- Sp.java). When you compile your java program using "javac" compiler, the compile convert your code into bytecode, which is exactly understand by the JVM. What is JIT compiler? JIT compilers is the part of JVM which increases the speed of execution of java program. What is JRE? JRE stands for Java Runtime Environment. JRE provides the

What is Java?

Image
What is Java? Java is a computer programming language that enforces an Object Oriented Programming model. Java is a programming language and computing platform first released by Sun Micro System in 1995. Java is created by James Gosling. Java is platform independent programming language that follows the logic of "Write once,Run anywhere". Java can be used to create complete applications that may run on a single computer or can be distributed among servers and client in a network. Java Features Simple- Java is easy to learn and its Syntax is quite simple,clean and easy to understand. The confusing and ambiguous concept of c++ are either left out in java or they have been re-implemented in a cleaner way. High performance- Although java is an interpreted language. It was designed to support "Just-in-time" compiler ,which dynamically compile bytecodes to machine code. Secure- Java can be used to develop virus-free systems. Java is secure because- Java programs runs insi