Java 5th Sem
Java 5th Sem
portable, simple and secure programming language. Apart from this, there are also some excellent
features which play an important role in the popularity of this language. The features of Java are also
known as Java buzzwords.*list of the most important features of the Java language is given below.##Java
Features*Simple*Object-Oriented*Portable*Platform independent*Secured*Robust*Architecture
neutral*Interpreted*High Performance*Multithreaded*Distributed*Dynamic
#Operators in Java--Operator in Java is a symbol that is used to perform operations. For example: +, -, *, /
etc.There are many types of operators in Java which are given below:*Unary Operator,*Arithmetic
Operator,*Shift Operator,*Relational Operator,*Bitwise Operator,*Logical Operator,*Ternary Operator
and*Assignment Operator.
#JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime
environment in which java bytecode can be executed.JVMs are available for many hardware and
software platforms (i.e. JVM is platform dependent).
#Java platform independent-The meaning of Java platform-independent is that the Java compiled
code(byte code) can run on all operating systems. A program is written in a language that is a human-
readable language. It may contain words, phrases, etc which the machine does not understand. For the
source code to be understood by the machine, it needs to be in a language understood by machines,
typically a machine-level language. So, here comes the role of a compiler. The compiler converts the
high-level language (human language) into a format understood by the machines.
#Java array is an object which contains elements of a similar data type. Additionally, The elements of an
array are stored in a contiguous memory location. It is a data structure where we store similar elements.
We can store only a fixed set of elements in a Java array.Array in Java is index-based, the first element of
the array is stored at the 0th index, 2nd element is stored on 1st index and so on.
#The super keyword in Java is a reference variable which is used to refer immediate parent class
object.Usage of Java super Keyword*Super can be used to refer immediate parent class instance
variable.*Super can be used to invoke immediate parent class method.*Super() can be used to invoke
immediate parent class constructor.
#In Java, ‘this’ is a reference variable that refers to the current object, or can be said “this” in Java is a
keyword that refers to the current object instance. It can be used to call current class methods and fields,
to pass an instance of the current class as a parameter, and to differentiate between the local and
instance variables. Using “this” reference can improve code readability and reduce naming conflicts.
#Inheritance in Java is a mechanism in which one object acquires all the properties and behaviors of a
parent object. It is an important part of OOPs (Object Oriented programming system).The idea behind
inheritance in Java is that you can create new classes that are built upon existing classes. When you
inherit from an existing class, you can reuse methods and fields of the parent class. Moreover, you can
add new methods and fields in your current class also.Terms used in Inheritance-*Class: A class is a group
of objects which have common properties. It is a template or blueprint from which objects are
created.*Sub Class/Child.
Class: Subclass is a class which inherits the other class. It also called a derived class, extended class, or
child class.*Super Class/Parent Class: Superclass is the class from where a subclass inherits the features.
It is also called a base class or a parent class.*Reusability: As the name specifies, reusability is a
mechanism which facilitates you to reuse the fields and methods of the existing class when you create a
new class. You can use the same fields and methods already defined in the previous class.