0% found this document useful (0 votes)
68 views32 pages

Java Why

About Java

Uploaded by

kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views32 pages

Java Why

About Java

Uploaded by

kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 32

What do you mean by platform

independence of Java?
Platform independence means that you can run the same Java
Program in any Operating System. For example, you can write
java program in Windows and run it in Mac OS.
Java Virtual Machine (JVM) is the heart of java programming language.
JVM is responsible for converting byte code into machine readable code.
JVM is not platform independent, thats why you have different JVM for
different operating systems.
We can customize JVM with Java Options, such as allocating minimum and
maximum memory to JVM. Its called virtual because it provides an
interface that doesnt depend on the underlying OS.

What is the difference between JDK


and JVM?
Java Development Kit (JDK) is for development purpose
and JVM is a part of it to execute the java programs.
JDK provides all the tools, executables and binaries
required to compile, debug and execute a Java Program.
The execution part is handled by JVM to provide
machine independence.

Which class is the superclass of all


classes?
java.lang.Objectis the root class for all the java
classes and we dont need to extend it.

Why Java doesnt support multiple


inheritance?
Java doesnt support multiple inheritance in classes
because of Diamond Problem.
However multiple inheritance is supported in interfaces.
An interface can extend multiple interfaces because
they just declare the methods and implementation will
be present in the implementing class. So there is no
issue of diamond problem with interfaces.

Why Java is not pure Object Oriented


language?
Java is not said to be pure object oriented because it
support primitive types such as int, byte, short, long
etc.
It brings simplicity to the language while writing our
code.
Obviously java could have wrapper objects for the
primitive types but just for the representation, they
would not have provided any benefit.
As we know, for all the primitive types we have wrapper
classes such as Integer, Long etc that provides some

You might also like