Unit 1 2marks
Unit 1 2marks
➢ Inheritance
➢ Polymorphism
➢ Data Hiding
➢ Encapsulation
➢ Overloading
➢ Reusability
There are many features of java. They are also known as java buzzwords.
1. Simple Object-Oriented
2.
Platform independent
3. Secured
4. Robust
5. Architecture neutral
6. Portable
7.
Dynamic
8. Interpreted
9. High Performance
10. Multithreaded
11. Distributed
Data with a set of operations for manipulating that data. It has state,
behavior and
Identity.
Share a
Time system which is called the Java Virtual Machine (JVM). Byte code
is the machine code instructions for the JVM and JVM is an Interpreter for
Byte code.
Or any block. Instance variables are created when an object is created with
the use of the keyword
7. Can a java source file be saved using the name other than the class
name? – justify
Yes, we compile a java file with a different name than the class, provided that
there should not be
If there is any public class in file then in that case, we have to give that name
as file name. But if
Our class does not contain any public class then we can give any name to
our class.
➢ Object
➢ Class
➢ Method and
➢ variables
Member variables and methods. The four levels of access specifiers in Java
are:
5. Others: 1. Static
2. Final
First row contains 4 elements, the second row with 1 element, the third row
with 2 elements and
1. Assignment
2. Arithmetic
3. Relational
4. Logical
5. Bitwise
6. Compound assignment
7. Conditional
8. Type.
16.
And its value would be the same as the current array element.
•
Expression: This evaluates to the array you need to loop through. The
expression can be an
➢ Identity
➢ State
➢ Behavior
20.
Methods are functions that operate on instances of classes in which they are
defined.
Objects can communicate with each other using methods and call
methods in other
2.
Return type
3. List of parameters
Static variable: It is class variable whose value remains constant for the
entire class.
Static Method: is the one which can be called by using class name itself and
can hold only the
Static variables.
23. What is the difference between static and non-static variable? (NOV/DEC
2010) (AN)
Static variable: There is only one copy of static variable is created and even
when the class is
Non-static variable: Every time the class is instantiated, the object has their
own copy of these
Variables.
Its state.
Method
Destructor is a function that frees the state of an object and/or destroys the
object itself. In Java,
Default values.
29.