0% found this document useful (0 votes)
4 views3 pages

Java Exam Notes

The document is a study guide for Java programming, detailing its history, key features, and comparisons with C and C++. It covers the Java Development Kit (JDK) tools, data types, and naming conventions. Java is highlighted as an object-oriented, platform-independent language with a focus on simplicity, security, and robustness.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

Java Exam Notes

The document is a study guide for Java programming, detailing its history, key features, and comparisons with C and C++. It covers the Java Development Kit (JDK) tools, data types, and naming conventions. Java is highlighted as an object-oriented, platform-independent language with a focus on simplicity, security, and robustness.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Java Programming: Exam Study Guide

1. History and Introduction


• Origin: Developed by James Gosling, Mike Sheridan, and Patrick Naughton (The Green
Team) at Sun Microsystems in June 1991. [cite: 185]

• Evolution: Originally named 'Greentalk' (.gt), then 'Oak', and finally 'Java' in 1995. [cite: 187,
188, 189]

• Definition: An object-oriented, class-based programming language and computing platform.


[cite: 183, 184]

• The Name 'Java': Named after Java coffee from an island in Indonesia. It is a name, not an
acronym. [cite: 190, 191, 192]

2. Key Features of Java


• Simple: Small and easy to learn; removes complex features like pointers and operator
overloading. [cite: 203, 204]

• Platform Independent: Bytecode runs on any platform via the Java Virtual Machine (JVM).
[cite: 206, 207]

• Secure: Does not support pointers and prevents virus interaction. [cite: 195]

• Robust: Highly reliable error handling and runtime exception management. [cite: 196, 197]

• Multithreading: Handles multiple tasks simultaneously using threads. [cite: 208, 209]

• Dynamic: Verifies and resolves access to objects at runtime. [cite: 210]

3. Java vs. C and C++


Feature Java C / C++
C: Procedural; C++: Both
Paradigm Object-Oriented [cite: 226]
[cite: 226, 228]
Platform Independent [cite: 226] Dependent [cite: 226, 228]
Pointers Not Supported [cite: 226] Supported [cite: 226]
Supports Structs/Unions [cite:
Memory No Structs/Unions [cite: 228]
228]

4. JDK Environment and Tools


Tool Description
javac Compiler: Translates source code into bytecode. [cite: 213]
java Interpreter: Executes the bytecode program actions. [cite: 214]
The heart of Java; converts bytecode to machine language.
JVM
[cite: 218, 219]
jdb Java Debugger: Used to locate errors. [cite: 215]
javadoc Creates HTML documentation from source code. [cite: 217]
5. Data Types and Naming Conventions
Primitive Data Types: [cite: 256, 258]

Type Size Range


Byte 8 bits -128 to 127
Int 4 bytes -2,147,483,648 to 2,147,483,647
Char 2 bytes 0 to 65,535
Boolean 1 byte True / False
Float 4 bytes -3.4e38 to 3.4e38

Naming Rules: [cite: 264, 266]

• Class: Start with a Capital letter (e.g., Student). [cite: 267]

• Method: Start with lowercase; use camelCase for multiple words (e.g., getName()). [cite:
268, 269]

• Variable: Start with alphabet or underscore; cannot start with a digit. [cite: 270]

• Constants: All uppercase with underscores (e.g., MAX_VALUE). [cite: 272]

You might also like