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

unit 1

The document outlines key features of Java, including its simplicity, object-oriented nature, and platform independence. It explains the differences between JDK, JRE, and JVM, and provides definitions and types of variables, primitive data types, and arrays. Additionally, it discusses Java's 'write once, run anywhere' capability and includes questions for further exploration of Java concepts.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

unit 1

The document outlines key features of Java, including its simplicity, object-oriented nature, and platform independence. It explains the differences between JDK, JRE, and JVM, and provides definitions and types of variables, primitive data types, and arrays. Additionally, it discusses Java's 'write once, run anywhere' capability and includes questions for further exploration of Java concepts.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1. What are the features of java?

[Remembering]
1. Simple
2. Object-Oriented
3. Portable
4. Platform independent
5. Secured
6. Robust
7. Architecture neutral
8. Interpreted
9. High Performance
10. Multithreaded
11. Distributed
12. Dynamic

2. Difference between JDK, JRE, and JVM. [Analyzing]


JDK is abbreviated as Java Development Kit which has a physical existence. It can be considered as a
kit inside which resides the JRE along with developing tools within it. The programmers and
developers mostly use it.
JVM is abbreviated as Java Virtual Machine, is basically a dummy machine or you can say an abstract
machine which gives Java programmers a runtime environment for executing the Bytecode. For each
execution of your program, the JDK and JRE come into use, and they go within the JVM to run the
Java source code.
JRE is abbreviated as Java Runtime Environment, as the name suggests used as a package that gives
an environment to run the Java program on your machine

3. What is bytecode? [Remembering]


Bytecode is a highly optimized set of instructions designed to be executed by the java run-time
system. Which is called the java virtual machine (JVM). JVM is an interpreter for bytecode.

4. What is a variable? What are the different types of variables? [Remembering]


Variable are locations in the memory that can hold values. Java has three kinds of variable namely,
Instance variable
Local variable
Class variable
Local variables are used inside blocks as counts or in methods as temporary variables. Once the block
or the method is executed, the variable ceases to exist. Instance variable are used to define
attributes or the state of a particular object. These are used to store information needed by multiple
methods in the objects.

5. What are the difference between static variable and instance variable? [Analyzing]
The data or variables, defined within a class are called instance variables.
Instance variables declared as static are, essentially, global variables. When objects of its class are
declared, no copy of a static variable is made.

6.What are primitive datatypes in java? [Remembering]


There are 8 types of primitive data types:
1. boolean data type
2. byte data type
3. char data type
4. short data type
5. int data type
6. long data type
7. float data type
8. double data type

7. Define Array? How to declare an array? [Remembering]


Java array is an object which contains elements of a similar data type. It is a data structure where we
store similar elements. We can store only a fixed set of elements in a Java array.
There are two types of array.
1. Single Dimensional Array
2. Multidimensional Array

int a[]=new int[5];//declaration

8. List out the operator in Java. [Creating]


1. Arithmetic Operators
2. Increment and Decrement Operators
3. Bitewise Operators
4. Relational Operators
5. Logical Operators
6. Assignment Operators

9. What gives java it’s “write once and run anywhere” nature? [Understanding]
All Java programs are compiled into class files that contain byte codes. These byte codes can be run
in any platform and hence java is said to be platform independent.
10. Why Java is Platform Independent. [Creating]
Java is platform independent because it can run on any platform i.e on windows,mac etc. ... Because
it contains its own virtual machine which have JRE which runs java program as byte code. You may
have different JRE for differentplatforms .Once you installed it in your system you can run any java
application on it.
11. Why Java is Architecture-Neutral. [Analyzing]
Java was designed to support applications on networks. To enable a Javaapplication to execute
anywhere on the network, the compiler generates anarchitecture-neutral object file format--the
compiled code is executable on many processors, given the presence of the Java runtime system

Big questions
1. Write short notes on Arrays with its declaration and with its type. Explain with suitable Program.
[Creating]
2. Explain briefly about the features of java. [Analyzing]
3. List out the operator in Java. write Program and and explain it. [Applying]
4. Write a program to explain Fibonacci series
5. Write a Java program to illustrate the searching of a number in an array
6. Write a Java program to demonstrate sorting of elements in an array.

You might also like