Академический Документы
Профессиональный Документы
Культура Документы
Answers
Define Synchronization in Java
Synchronization in Java is a process in which the accessibility of shared
resources are controlled by making use of multiple threads in such a way
that only a single resource could be accessed at one time. A shared object
could be modified using a single thread whereas another thread would be
involved in the process of updating or using the value of the object in
non-synchronized multi-threaded application.
What is meant by JVM and why Java is considered as a Platform
Independent Programming Language?
JVM otherwise known as Java Virtual Machine is considered as an
interpreter that is capable of accepting and executing the Bytecode.
Because Java works on the basis of compile once, run everywhere, it has
been termed as a platform independent language.
The sequential steps that give an insight in to the platform independent
characteristics are as follows.
package of software which can be used for creating Java based software.
On the other hand, JRE stands for Java Runtime Environment. It is
nothing but an implementation of Java Virtual Machine that is capable of
executing Java programs. Each of the JDK would be comprised of one or
more JREs in addition to different kind of development tools such as Java
source compilers, debuggers, development libraries and bundling as well
as deployment of tools etc.
What is the difference between Constructors, Copy Constructor
and Constructor Overloading in Java?
For beginners, Constructors is considered to be basics of OOPS.
Constructor Creating an instance of a class remains the most important
objective of having Constructors. Whenever an object of a class has been
created, the constructors would be invoked. Some of the key
characteristics of Java Constructors are as follows.
Value is not returned and therefore they need not have to specify
the keyword void.
between
Character Streams
Character streams work along with characters other than bytes. Unicode
conventions are considered while storing the characters in Java. During
such type of storage, characters usually become platform independent,
program independent as well as language independent.
Differentiate between the functions of Over-Riding and OverLoading in Java?
It is regarded as an important aspect in Object-Oriented Programming
and the concepts as well as functionalities of Over-Riding and OverLoading in Java has to be understood by every Java programmer.
Over-Riding
It is a function type that occurs in a class that is inherited by another
class. The functions that are inherited from the base class are replaced by
means of an Over-Ride function. However it is implemented in such a way
that it is called even though an instance of its class is pretending to be
different type through polymorphism.
Over-Loading
Whenever multiple methods with the same name along with different
parameters are defined through an action, then it can be defined as
overloading. However it is not at all related to overriding or
polymorphism. Two mechanisms are usually used for overloading the
functions in Java. The two mechanisms include varying the number of
arguments as well as varying the data type.
List the most common data types supported by Java
This is one of the most popular and fundamental questions that are asked
as part of Java interview questions.
The list of eight primitive data types supported by Java is as follows.
Byte
Short
Int
Long
Float
Double
Char
Boolean
major
difference
between
StringBuffer
and