Posts

Automatic Memory Management

  Java uses an   automatic garbage collector   to manage memory in the   object lifecycle . The programmer determines when objects are created, and the Java runtime is responsible for recovering the memory once objects are no longer in use. Once no references to an object remain, the   unreachable memory   becomes eligible to be freed automatically by the garbage collector. Something similar to a   memory leak   may still occur if a programmer's code holds a reference to an object that is no longer needed, typically when objects that are no longer needed are stored in containers that are still in use. If methods for a non-existent object are called, a   null pointer   exception is thrown. [52] [53] One of the ideas behind Java's automatic memory management model is that programmers can be spared the burden of having to perform manual memory management. In some languages, memory for the creation of objects is implicitly allocated on the...

JAVA JBM and Bytecode

 One design goal of Java is portability, which means that programs written for the Java platform must run similarly on any combination of hardware and operating system with adequate run time support. This is achieved by compiling the Java language code to an intermediate representation called Java bytecode, instead of directly to architecture-specific machine code. Java bytecode instructions are analogous to machine code, but they are intended to be executed by a virtual machine (VM) written specifically for the host hardware. End users commonly use a Java Runtime Environment (JRE) installed on their machine for standalone Java applications, or in a web browser for Java applets. Standard libraries provide a generic way to access host-specific features such as graphics, threading, and networking. The use of universal bytecode makes porting simple. However, the overhead of interpreting bytecode into machine instructions made interpreted programs almost always run more slowly than nat...

JAVA SYNTAX

Image
  The syntax of Java is largely influenced by C++ and C. Unlike C++, which combines the syntax for structured, generic, and object-oriented programming, Java was built almost exclusively as an object-oriented language.[18] All code is written inside classes, and every data item is an object, with the exception of the primitive data types, (i.e. integers, floating-point numbers, boolean values, and characters), which are not objects for performance reasons. Java reuses some popular aspects of C++ (such as the printf method). Unlike C++, Java does not support operator overloading[55] or multiple inheritance for classes, though multiple inheritance is supported for interfaces.[56] Java uses comments similar to those of C++. There are three different styles of comments: a single line style marked with two slashes (//), a multiple line style opened with /* and closed with */, and the Javadoc commenting style opened with /** and closed with */. The Javadoc style of commenting allows the ...

Java,A programming language

Image
Java was originally developed by James Gosling at Sun Microsystems (which has since been acquired by Oracle) and released in 1995 as a core component of Sun Microsystems' Java platform. The original and reference implementation Java compilers, virtual machines, and class libraries were originally released by Sun under proprietary licenses. As of May 2007, in compliance with the specifications of the Java Community Process, Sun had relicensed most of its Java technologies under the GPL-2.0-only license. Oracle offers its own HotSpot Java Virtual Machine, however the official reference implementation is the OpenJDK JVM which is free open-source software and used by most developers and is the default JVM for almost all Linux distributions. As of September 2021, the latest version is Java 17, it, Java 11 and 8 are the currently supported long-term support (LTS) versions. Oracle released the last zero-cost public update for the legacy version Java 8 LTS in January 2019 for commerci...

Java Programming Language

Image
Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible.

Rajgir

Image
  Rajgir   (historically known as   Rājagṛiha ), meaning "House of the Kings," is an ancient city and a   municipal council   in   Nalanda district   of Magadh region in the   Indian   state   of   Bihar . The city of Rajgir (ancient   Rājagṛha ;   Pali :   Rājagaha ) was the first capital of the kingdom of   Magadha , a state that would eventually evolve into the   Mauryan Empire . [4]   The city finds mention in India's greatest literary epic, the   Mahabharata , through its king   Jarasandha . Its date of origin is unknown, although ceramics dating to about 1000 BC have been found in the city. The 2,500-year old   Cyclopean Wall   is located in the city. This area is also notable in   Jainism   and   Buddhism . [5]   It was the birthplace of the 20th Jain   Tirthankar   Munisuvrata , and is closely associated with the arihant   Mahavira   an...

C++ Programming Language

Image
  C++   ( / ˌ s iː ˌ p l ʌ s ˈ p l ʌ s / ) is a   general-purpose programming language   created by   Bjarne Stroustrup   as an extension of the   C programming language , or "C with   Classes ". The language has expanded significantly over time, and modern C++ now has   object-oriented ,   generic , and   functional   features in addition to facilities for   low-level   memory   manipulation. It is almost always implemented as a   compiled language , and many vendors provide   C++ compilers , including the   Free Software Foundation ,   LLVM ,   Microsoft ,   Intel ,   Oracle , and   IBM , so it is available on many platforms. [9] C++ Logo endorsed by Standard C++ Paradigms Multi-paradigm :  procedural ,  functional ,  object-oriented ,  generic ,  modular Family C Designed by Bjarne Stroustrup Developer ISO/IEC JTC1 (Joint Technical Committee...