It-404 (T) Feb 16
It-404 (T) Feb 16
JDK means java development kit. It contains JRE+ development tools. The JDK is a superset of
the JRE, and contains everything that is in the JRE, plus tools such as the compilers and
debuggers necessary for developing applets and applications.
JRE
Lib
JVM
Devel
opme
nt
tools
Files
JRE means java runtime environment. It is used to provide runtime environment. The Java
Runtime Environment (JRE) provides the libraries, the Java Virtual Machine, and other file
components to run applets and applications written in the Java programming language. In
addition, two key deployment technologies are part of the JRE:
Java Plug-in: which enables applets to run in a browser.
Java Web Start: which deploys standalone applications over a network.
It is also the foundation for the technologies in the Java 2 Platform, Enterprise Edition (J2EE) for
enterprise software development and deployment. The JRE does not contain tools and utilities
such as compilers or debuggers for developing applets and applications.
JVM means java virtual machine. JVM (Java Virtual Machine) is an abstract machine. It is a
specification that provides runtime environment in which java byte code can be executed. JVM
does not understand the java language. Thats why at the time of compilation of .java file
produces .class files containing the byte codes understandable by the JVM. It's also the entity
that allows Java to be a "portable language" (write once, run anywhere). JVMs are available for
many hardware and software platforms. Indeed there are specific implementations of the JVM
for different systems (Windows, Linux, Mac OS).The aim is that with the same byte codes they all
give the same results.
[email protected] +91-9830-740-684
sohamsironline.weebly.com,
sohamsironline.ucoz.com
Loads code.
Verifies code.
Executes code.
Provides runtime environment.
2. Why is JAVA consider to be platform independent? And what does platform refer to here?
[email protected] +91-9830-740-684
sohamsironline.weebly.com,
sohamsironline.ucoz.com
Example 1:
Example 2:
6. How many types of primitive data available in java & occupy the memory.
There are 8 types of primitive data available in java:
o Numeric: 1. Whole Numbers
2. Fractions
Whole Numbers: byte 1 byte default value 0
short2 bytes default value 0
int 4 bytes default value 0
long 8 bytes default value 0
Fractions: float 4 bytes default value 0.0f
Double 8 bytes default value 0 .0
o Symbolic: char 2 bytes (Sun Unicode Character) default value\u0000
o Logical: boolean 1 byte default value false
7. State the rules of unary & binary operators in java. State with code snippet.
[email protected] +91-9830-740-684
sohamsironline.weebly.com,
sohamsironline.ucoz.com
Compilation Error
result will be
int
Code-II
Input Operand Types: byte, long
Max(byte, long) long which is > int
10. Can you assign a value to the length of array to change the no. of elements?
11. Write a code snippet containing a function which returns an array.
12. Write a code snippet to demonstrate the concepts of command & arguments.
13. Write a c code equivalent to the above &test if there is any difference between the two.
[email protected] +91-9830-740-684
sohamsironline.weebly.com,
sohamsironline.ucoz.com