Basic Java Interview Questions and Answers, Schemes and Mind Maps of Computer science

A set of fundamental java interview questions and answers, covering key concepts such as platform independence, jvm, jit, and memory management. it's valuable for students preparing for job interviews or those seeking to solidify their understanding of core java principles. The questions delve into the features of java, explaining its platform independence and object-oriented nature. the answers provide clear explanations of jvm architecture and memory storage within the jvm.

Typology: Schemes and Mind Maps

2022/2023

Available from 04/25/2025

jayasri-prabakaran
jayasri-prabakaran 🇮🇳

4 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
BASIC INTERVIEW QUESTIONS IN JAVA
1. Is Java Platform Independent if then how?
Yes, Java is a Platform Independent language. Unlike many programming languages
javac compiles the program to form a bytecode or .class file. This file is independent
of the software or hardware running but needs a JVM(Java Virtual Machine) file
preinstalled in the operating system for further execution of the bytecode.
Although'JVM is platform dependent, the bytecode can be created on any System
and can be executed in any other system despite hardware or software being used
which makes Java platform independent.
2. What are the top Java Features?
Java is one the most famous and most used language in the real world, there are many
features in Java that makes it better than any other language some of them are
mentioned below:
Simple: Java is quite simple to understand and the syntax
Platform Independent:'Java is platform independent means we can run the same
program in any software and hardware and will get the same result.
Interpreted: Java is interpreted as well as a compiler-based language.
Robust: features like Garbage collection, exception handling, etc that make the
language robust.
pf3
pf4

Partial preview of the text

Download Basic Java Interview Questions and Answers and more Schemes and Mind Maps Computer science in PDF only on Docsity!

BASIC INTERVIEW QUESTIONS IN JAVA

1. Is Java Platform Independent if then how? Yes, Java is a Platform Independent language. Unlike many programming languages javac compiles the program to form a bytecode or .class file. This file is independent of the software or hardware running but needs a JVM(Java Virtual Machine) file preinstalled in the operating system for further execution of the bytecode. Although JVM is platform dependent , the bytecode can be created on any System and can be executed in any other system despite hardware or software being used which makes Java platform independent. 2. What are the top Java Features? Java is one the most famous and most used language in the real world, there are many features in Java that makes it better than any other language some of them are mentioned below:  Simple : Java is quite simple to understand and the syntax  Platform Independent: Java is platform independent means we can run the same program in any software and hardware and will get the same result.  Interpreted : Java is interpreted as well as a compiler-based language.  Robust : features like Garbage collection, exception handling, etc that make the language robust.

Object-Oriented : Java is an object-oriented language that supports the concepts of class, objects, four pillars of OOPS, etc.  Secured : As we can directly share an application with the user without sharing the actual program makes Java a secure language.  High Performance: faster than other traditional interpreted programming languages.  Dynamic : supports dynamic loading of classes and interfaces.  Distributed : feature of Java makes us able to access files by calling the methods from any machine connected.  Multithreaded : deal with multiple tasks at once by defining multiple threads  Architecture Neutral : it is not dependent on the architecture.

3. What is JVM? JVM stands for Java Virtual Machine it is a Java interpreter. It is responsible for loading, verifying, and executing the bytecode created in Java. Although it is platform dependent which means the software of JVM is different for different Operating Systems it plays a vital role in making Java platform Independent. To know more about the topic refer to JVM in Java. 4. What is JIT? JVM stands for Java Virtual Machine it is a Java interpreter. It is responsible for loading, verifying, and executing the bytecode created in Java.

  1. Program Counter Register: stores the address of the Java virtual machine instruction currently being executed.
  2. Native Method Stack: stores all the native methods used in the application.