0% found this document useful (0 votes)
38 views

Java_Basics_QA_Notes

Java is a high-level, object-oriented programming language developed in 1995, known for its platform independence and versatility in building various applications. Key features include simplicity, security, robustness, and support for multithreading. The Java Virtual Machine (JVM) executes Java bytecode, ensuring portability and managing memory and security.

Uploaded by

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

Java_Basics_QA_Notes

Java is a high-level, object-oriented programming language developed in 1995, known for its platform independence and versatility in building various applications. Key features include simplicity, security, robustness, and support for multithreading. The Java Virtual Machine (JVM) executes Java bytecode, ensuring portability and managing memory and security.

Uploaded by

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

Java Programming Basics - Q&A Notes

1. What is Java?

Java is a high-level, object-oriented, and platform-independent programming language developed by Sun Microsystems

in 1995. It is used to build various types of applications such as web, mobile, and enterprise software.

2. What are the basic features of Java?

- Simple: Easy syntax and automatic memory management.

- Object-Oriented: Supports encapsulation, inheritance, and polymorphism.

- Platform-Independent: Runs on JVM, ensuring portability.

- Secure: Built-in security features and sandboxing.

- Robust: Strong error handling and memory management.

- Multithreaded: Supports concurrent execution.

- Architecture Neutral: Bytecode can run on any platform.

- High Performance: JIT compiler boosts execution speed.

- Distributed: Tools for building distributed systems.

- Dynamic: Loads classes at runtime.

3. What is JVM?

JVM stands for Java Virtual Machine. It is a part of the Java Runtime Environment (JRE) and is responsible for

executing Java bytecode. It provides platform independence and handles memory management, garbage collection, and

security.

4. Write a simple Java program.

public class HelloWorld {

public static void main(String[] args) {


Java Programming Basics - Q&A Notes

System.out.println("Hello, World!");

Explanation:

- 'public class HelloWorld': Declares a class.

- 'public static void main': Entry point of the program.

- 'System.out.println': Prints message to console.

5. What are primitive data types and variables in Java?

Java has 8 primitive data types: byte, short, int, long, float, double, char, and boolean. A variable is a container that

holds data of a particular type.

Example: int age = 25; // 'age' is a variable of type int.

6. What are Java keywords?

Java keywords are reserved words that have predefined meanings in the language and cannot be used for variable

names or identifiers.

Examples: class, public, static, void, int, if, else, return, new, etc.

You might also like