0% found this document useful (0 votes)
50 views

Java Set-1 Answers

Java has been successful for several reasons: 1. It is object oriented, portable, and has free and open source libraries. 2. It is platform independent through its "Write Once Run Anywhere" (WORA) capability which allows code to run on any machine. 3. The Java Virtual Machine (JVM) makes Java platform independent while remaining dependent on the underlying operating system.

Uploaded by

Mounika Mouni
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

Java Set-1 Answers

Java has been successful for several reasons: 1. It is object oriented, portable, and has free and open source libraries. 2. It is platform independent through its "Write Once Run Anywhere" (WORA) capability which allows code to run on any machine. 3. The Java Virtual Machine (JVM) makes Java platform independent while remaining dependent on the underlying operating system.

Uploaded by

Mounika Mouni
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

REASONS FOR JAVA SUCCESS:

It is object oriented programming language.

It is portable.

Free & Open source Libraries

Platform Independent

WORA:

Write once Run anywhere

is the feature applicable to those programs which hold the capability to execute itself on any operating
systems or on any machine. This terminology was given by Sun Microsystem for their programming
language - Java. According to this concept, the same code must run on any machine and hence the
source code needs to be portable

WHAT IS MEANT BY PLATFORM INDEPENDENCE:

When we compile Java code then .class file is generated by javac compiler. These codes are readable by
JVM and every operating system have its own JVM so JVM is platform dependent but due to JVM java
language is become platform independent.

WHAT IS MEANT BY OPEN SOURCE:

In general, open source refers to any program whose source code is made available for use or
modification as users or other developers see fit. Open source software is usually developed as a public
collaboration and made freely available.

WHAT IS AN ASSEMBLER:

The Assembler is used to translate the program written in Assembly language into machine code. The
source program is a input of assembler that contains assembly language instructions. The output
generated by assembler is the object code or machine code understandable by the computer.

COMPILER:

The language processor that reads the complete source program written in high level language as a
whole and translates it into an equivalent program in machine language is called as a Compiler.

Example: C, C++, C#, Java

WHAT WAS JAVA INITIALLY KNOWN AS:

Oak is a discontinued programming language created by James Gosling in 1991, initially for Sun
Microsystems' set-top box project. The language later evolved to become Java.
WHO WERE THE INVENTORS OF JAVA

Java programming language was invented by a group of engineers at the Sun Microsystems company,
led by engineer James Gosling. The team, which was known as the 'Green Team,' developed Java in
1991.

WHICH COMPANY'S PRODUCT WAS JAVA INITIALLY:

Java was originally developed by James Gosling at Sun Microsystems and released in 1995 as a core
component of Sun Microsystems' Java platform.

WHICH COMPANY'S PRODUCT WAS JAVA CURRENTLY:

Oracle Corporation is the current owner of the official implementation of the Java.

DIFFERENCE BETWEEN JDK & JRE

JDK:

The Java Development Kit (JDK) is a software development environment used for developing Java
applications and applets. It includes the Java Runtime Environment (JRE), an interpreter/loader (Java), a
compiler (javac), an archiver (jar), a documentation generator (Javadoc) and other tools needed in Java
development.

JRE:

JRE stands for “Java Runtime Environment” and may also be written as “Java RTE.” The Java Runtime
Environment provides the minimum requirements for executing a Java application; it consists of the Java
Virtual Machine (JVM), core classes, and supporting files.

JDK:

Java Development Kit (in short JDK) is Kit which provides the environment to develop and execute(run)
the Java program. JDK is a kit(or package) which includes two thingS

1. Development Tools(to provide an environment to develop your java programs)

2.JRE (to execute your java program).

JRE:

JRE is the region of memory to allocate on the memory for execution of particular java application.

JVM
Java Virtual machine(JVM) is a very important part of both JDK and JRE because it is contained or inbuilt
in both. Whatever Java program you run using JRE or JDK goes into JVM and JVM is responsible for
executing the java program line by line hence it is also known as interpreter.

IS JVM PLATFORM INDEPENDENT/DEPENDENT? WHY?

JVM (Java virtual machine) is platform dependent while java language is platform independent.

JVM is one kind of interface or middleware between OS(Operating Systems) and java language.
JVM provides the environment to execute the java file(. Class file). So at the end it's depends on
your kernel. And kernel is differ from OS to OS. So JVM is platform dependent.

WHAT IS CLASS FILE

A Java class file is a file containing Java bytecode and having .class extension that can be
executed by JVM. A Java class file is created by a Java compiler from .java files as a result of
successful compilation.

WHAT IS AN INTERMEDIATE CODE IN JAVA

Intermediate code is used to translate the source code into the machine code. Intermediate code
lies between the high-level language and the machine language.

Java intermediate code is also known as Byte code.

JIT:

The JIT compiler helps improve the performance of Java programs by compiling bytecodes into
native machine code at run time. The JIT compiler is enabled by default. When a method has
been compiled, the JVM calls the compiled code of that method directly instead of interpreting
it.

WHAT IS CLASS LOADER:

Class loaders are responsible for loading Java classes during runtime dynamically to the
JVM (Java Virtual Machine). Also, they are part of the JRE (Java Runtime Environment).
Hence, the JVM doesn’t need to know about the underlying files or file systems in order to run
Java programs thanks to class loaders.

Also, these Java classes aren’t loaded into memory all at once, but when required by an
application. This is where class loaders come into the picture. They are responsible for loading
classes into memory.

WHAT IS BYTE CODE VERIFIER:


Byte Code Verifier is a software which is present on RAM. The duty of byte code verifier

INTERPRETER:

Interpreter is a translator which converts high level language code to machine level language line
by line.

DIFFERENCE BETWEEN COMPILER & INTERPRETER:

It is a software which converts HTLL to MLL. HLL to MLL line by line.

It is fast in execution Slow in execution

Occupies more memory on RAM Occupies less memory.

IS JAVA A COMPILED OR INTERPRETED LANGUAGE:

WHAT IS RUNTIME SYSTEM:

WHAT IS THE LATEST VERSION OF JAVA AVAILABLE AND WHEN WAS IT


RELEASED:

Java 12-------ON 19 MARCH 2019.

WHAT IS THE NEXT VERSION OF JAVA AND WHEN

Java 13------expected release date September 2019

HOW DID JAVA DRASTICALLY GROW IN FEATURES:

1. The java Platform module system

2. Linking

3. The java Platform module system

WHAT IS DISADVANTAGE OF JAVA

Performance
Java programs take much longer time to run compared to C/C++.

Cost
Since memory and processing requirements higher, hardware cost increases.
Garbage collection
There is no control over garbage collection in Java. That is programmer does not have any right
to control the garbage collection. Java does not provide functions like delete(), free().

WHEN WAS FIRST VERSION OF JAVA OFFICIALLY RELEASED:

JDK 1.0. The first version was released on January 23, 1996.

SINCE WHEN WAS JAVA UNOFFICIALLY AVAILABLE:

WHAT IS MEANT BY ARCHITECTURE NEUTRALITY:


Java was designed to support applications on networks. In general, networks are composed of a variety
of systems with a variety of CPU and operating system architectures. To enable a Java application to
execute anywhere on the network, the compiler generates an architecture-neutral object file format--
the compiled code is executable on many processors, given the presence of the Java runtime system.

HOW IS OBJECT FILE DIFFERENT FROM CLASS FILE

Object file contains MLL


It is an incomplete file.
Object file obtains after compilation.
It cannot be executed.

A Java class file is a file containing Java bytecode that can be executed on the Java Virtual Machine. A
Java class file is usually produced by a Java compiler from Java programming language source files
containing Java classes..

IS CLASS FILE PLATFORM DEPENDENT:


If a source file has more than one class, each class is compiled into a separate class file. JVMs are
available for many platforms, and a class file compiled on one platform will execute on a JVM of another
platform. This makes Java applications platform-independent.

IS OBJECT FILE PLATFORM DEPENDENT:

Yes. In general object file formats might be the same, e.g. ELF, but the contents of the object files will
vary from system to system.

CAN WE HAVE A SINGLE JVM ON A SYSTEM WHICH HAS MULTIPLE OS:


No. I think so.

WHAT IS MEANT BY A PLATFORM:


Java platform is a collection of programs that help to develop and run programs written in the Java
programming language. Java platform includes an execution engine, a compiler, and a set of libraries.
COMMENT ON THE SPEED OF JAVA

Slow, While running java applications.

WHAT CATEOGY OF APPLICATIONS CAN BE DEVELOPED USING JAVA


1) Standalone IAWT and Swing are used in java for creating standalone applications.
2) Web App An application that runs on the server side and creates dynamic page, is called web
application. Currently, servlet, jsp, struts, jsf etc. technologies are used for creating web applications in
java.
3) Enterprise App
4) Mobile App
WHAT IS THE SINGLE MOST IMPORTANT FEATURE OF JAVA THAT LED TO ITS
SUCCESS:
to make it portable, simple and secure programming language.

WHAT IS THE DIFFERENCE BETWEEN JDK AND JVM

JVM

JVM (Java Virtual Machine) is an abstract machine. It is called a virtual machine because it
doesn't physically exist. It is a specification that provides a runtime environment in which Java
bytecode can be executed. It can also run those programs which are written in other languages
and compiled to Java bytecode.

JDK is an acronym for Java Development Kit. The Java Development Kit (JDK) is a software
development environment which is used to develop Java applications and applets. It physically
exists. It contains JRE + development tools.

JDK is an implementation of any one of the below given Java Platforms released by Oracle
Corporation:

 Standard Edition Java Platform


 Enterprise Edition Java Platform
 Micro Edition Java Platform

WHAT IS MEANT BY LOADING


Loading is the process that loads the executable file on to the RAM for the execution. It performs
through loader.

WHAT IS MEANT BY SAVING

WHY IS THE PRIMARY MEMORY CALLED AS MAIN MEMORY


WHY IS HARD DISK CALLED AS THE SECONDARY MEMORY

WHAT IS A POINTER AND DOES JAVA SUPPORT POINTERS

Pointer is a variable which can holds the address of another variable or object of same type.No,
java doesn't support pointer because improper handling of pointers lead to memory leaks and
readability issues

WHAT IS THE DIFFERENCE BETWEEN PATH AN CLASSPATH

The difference between path and classpath is that path is an environment variable used to refer the
location of Java executable files while classpath is an environment variable used to refer the location of
the class files.

WHAT ENVIRONMENT VARIABLES DO I NEED TO SET ON MY MACHINE IN ORDER


TO BE ABLE TO RUN JAVA PROGRAMS

CLASSPATH and PATH are the two variables.

WHAT IS AN OBJECT FILE

Object file contains MLL


It is an incomplete file.
Object file obtains after compilation.
It cannot be executed.

WHAT IS AN EXECUTABLE FILE


It contains code in MLL.
It is complete file
Obtained after linking obj. files with library files.
It can be executed.

IS AN OBJECT FILE EXECUTABLE:


No.

WHAT IS LINKAGE EDITOR:


The linkage editor is a processing program that accepts object modules, load modules, control
statements, and options as input. It combines these modules, according to the requirements
defined by the control statements and options, into a single output load module that can be stored
in a partitioned data set program library and loaded into storage for execution by the program
management loader.

WHAT IS LINKING LOADER

WHAT IS EXECUTABLE IMAGE:


The .exe files are called executable files/images.

WHAT ARE LIBRARY FILES

A Java library contains code which you can access and use in your Java project.

Here is a brief description of some of the libraries:

 java.lang
 java.util
 java.math

DO LIBRARY FILES CONTAIN CODE IN HLL

The Data Library contains information about the original structure of the packages.

ARE LIBRARY FILES MACHINE DEPENDENT


NO.
WHY CANNOT WE EXECUTE AN OBJECT FILE
Object is an incomplete file. So, we cannot run those files.
CAN WE SEND HLL CODE OVER INTERNET COMMENT
Yes.

CAN WE SEND MLL CODE OVER INTERNET COMMENT

CAN WE SEND IL CODE OVER INTERNET COMMENT


Yes.c

WHAT ARE THE REASONS FOR JAVA SLOWNESS:

There is a poorly responding backend system

The Server hosting your application is running slow or running out of resources

Garbage collection overhead

Poor Application Architecture

You might also like