0% found this document useful (0 votes)
9 views1 page

Java Basics: Handwritten Notes Day 1

The document provides an introduction to Java, highlighting its object-oriented nature and the concept of 'write once, run anywhere' (WORA). It explains the roles of JVM, JRE, and JDK, and outlines the basic structure of a Java program, including variables, data types, and input/output methods. Additionally, it presents a simple example of a Java program that prints 'Hello, World!'.

Uploaded by

Priyabhandavi
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)
9 views1 page

Java Basics: Handwritten Notes Day 1

The document provides an introduction to Java, highlighting its object-oriented nature and the concept of 'write once, run anywhere' (WORA). It explains the roles of JVM, JRE, and JDK, and outlines the basic structure of a Java program, including variables, data types, and input/output methods. Additionally, it presents a simple example of a Java program that prints 'Hello, World!'.

Uploaded by

Priyabhandavi
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

Java Handwritten-Style Notes (Day 1: Basics)

✍■ Introduction to Java
- Java is a high-level, object-oriented programming language.
- Write once, run anywhere (WORA) → Java programs can run on any machine with JVM.
- Used in Web apps, Mobile apps (Android), Desktop, Games, Cloud, etc.

✍■ JVM, JRE, JDK


- JVM (Java Virtual Machine): Runs Java bytecode.
- JRE (Java Runtime Environment): Contains JVM + Libraries (to run programs).
- JDK (Java Development Kit): JRE + Development tools (to write programs).

✍■ Structure of a Java Program


public class HelloWorld {
public static void main(String[] args) {
[Link]("Hello, World!");
}
}
■ public class → Defines a class (same as filename).
■ main method → Entry point of program.
■ [Link] → Prints output.

✍■ Variables & Data Types


- Variable = container for data.
- Syntax: dataType variableName = value;
Example:
int age = 22;
String name = "Priya";
double pi = 3.14;

Primitive Types → int, float, double, char, boolean


Non-Primitive → String, Arrays, Classes

✍■ Input / Output in Java


- Output: [Link]("Hello");
- Input: Use Scanner class.
Example:
import [Link];
Scanner sc = new Scanner([Link]);
int n = [Link]();

✍■ First Program Flow

You might also like