Tuesday, October 6, 2026

GCE A/L ICT Competency 11.1 - IoT & Embedded Systems Notes Questions and Answers Model Paper Online ICT Classes

ЁЯМР G.C.E. A/L ICT – Competency 11.1

Internet of Things (IoT) | Basic Digital / Embedded System Building Blocks | Arduino & Practical Applications

Embedded Systems Microcontroller Development Board Arduino IDE Sensors & Outputs
ЁЯза 1. Embedded System (роЙроЯ்рокொродிроХ்роХрок்рокроЯ்роЯ роЕрооைрок்рокு) ▼
роОро│ிроп ро╡ро░ைропро▒ை:
роТро░ு роХுро▒ிрок்рокிроЯ்роЯ роЪெропро▓்рокாроЯ்роЯை роХроЯ்роЯுрок்рокроЯுрод்родுро╡родро▒்роХாроХ роТро░ு electronic/mechanical роЪாродройрод்родிро▒்роХுро│் рокொро░ுрод்родрок்рокроЯ்роЯ роХрогிройி роЕрооைрок்рокு Embedded System роОройрок்рокроЯுроо்.

роЙродாро░рогроЩ்роХро│்

Washing machine Microwave oven Digital camera Traffic light controller Air conditioner Car engine control Smart security system

Example: Automatic Fan System

Temperature Sensor (Input) ↓ Microcontroller (Decision) ↓ Fan (Output ON/OFF)

Logic:
Temperature > 30°C → Fan ON
Temperature ≤ 30°C → Fan OFF

роЗродுро╡ே роТро░ு роЪிро▒ிроп Embedded System роЖроХுроо்.

⚙️ 2. Microprocessor vs Microcontroller ▼

роЗрои்род роЗро░рог்роЯு роЪொро▒்роХро│ைропுроо் exam-ро▓் роХுро┤рок்рокிроХ்роХொро│்ро│ роХூроЯாродு.

Microprocessor

CPU-ро╡ை роороЯ்роЯுроо் роТро░ு chip-ро▓் роХொрог்роЯ processing unit. RAM, Storage, I/O рокோрой்ро▒ро╡ை ро╡ெро│ிрок்рокுро▒рооாроХ родேро╡ைрок்рокроЯுроо்.

Example: Intel Core, AMD (Desktop PCs)

Microcontroller

CPU, Memory, I/O ports, Timers, ADC рокோрой்ро▒ роЕройைрод்родுроо் роТро░ே chip-ро▓் роТро░ுроЩ்роХிрогைроХ்роХрок்рокроЯ்роЯ роЪிро▒ிроп control computer.

Example: ATmega328P (Arduino-ро╡ிро▓்)

ЁЯЫа️ 3. Development Board & PC vs Dev Board ▼

Development Board роОрой்рокродு рооாрогро╡ро░்роХро│்/Developers electronic applications роЙро░ுро╡ாроХ்роХро╡ுроо், program роЪெроп்ропро╡ுроо் рокропрой்рокроЯுрод்родுроо் роТро░ு platform роЖроХுроо்.

Examples: Arduino, Raspberry Pi, Micro:bit

Traditional Computer vs Development Board

Traditional Computer (PC)Development Board (Arduino)
General-purpose tasksSpecific control tasks
Keyboard, mouse (Inputs)Sensors, switches (Inputs)
Monitor, printer (Outputs)LED, motor, fan (Outputs)
рокெро░ிроп Operating System родேро╡ைроЪிро▒ிроп control program рокோродுрооாройродு
роЕродிроХ processing resourcesроХுро▒ைрои்род resources-ро▓் ро╡ேро▓ை роЪெроп்ропுроо்
General computingEmbedded / physical control
ЁЯУЯ 4. Arduino Board – рооுроХ்роХிроп Building Blocks ▼

Analog Input

родொроЯро░்роЪ்роЪிропாроХ рооாро▒роХ்роХூроЯிроп values (Temperature, Light). ADC рооூро▓роо் 0-1023 digital value роЖроХ рооாро▒்ро▒рок்рокроЯுроо்.

Digital Input / Output

роЗро░рог்роЯு роиிро▓ைроХро│் роороЯ்роЯுрооே: HIGH (1) роЕро▓்ро▓родு LOW (0). (Eg: Push button, LED).

RX / TX Pins

RX (Receive): Data рокெро▒ (Pin 0).
TX (Transmit): Data роЕройுрок்рок (Pin 1). Serial communication-роХ்роХு рокропрой்рокроЯுроо்.

USB Port

Computer-роХ்роХு connect роЪெроп்родு Program upload роЪெроп்ропро╡ுроо், Power supply ро╡ро┤роЩ்роХро╡ுроо் рокропрой்рокроЯுроо்.

Power Supply

Board роЗропроЩ்роХ родேро╡ைропாрой рооிрой்роЪாро░роо் (USB ро╡ро┤ிропாроХро╡ோ роЕро▓்ро▓родு External adapter ро╡ро┤ிропாроХро╡ோ).

Reset Switch

роЗродை роЕро┤ுрод்родிройாро▓் board-рой் program execution рооீрог்роЯுроо் роЖро░роо்рок роиிро▓ைропிро▓ிро░ுрои்родு (setup) родொроЯроЩ்роХுроо்.

ЁЯТ╗ 5. IDE & Arduino Program Structure ▼

IDE (Integrated Development Environment): Code роОро┤ுрод, Compile роЪெроп்роп рооро▒்ро▒ுроо் Board-роХ்роХு Upload роЪெроп்роп роЙродро╡ுроо் software. (Eg: Arduino IDE).

Program Workflow

Source Code (Editor) ↓ Compiler (Machine Code роЖроХ рооாро▒்ро▒ுроо்) ↓ Upload / Programmer (Board-рой் Memory-роХ்роХு роЕройுрок்рокுроо்) ↓ Microcontroller (Execute роЪெроп்ропுроо்)

Basic Arduino Structure

void setup() { // Program роЖро░роо்рокிроХ்роХுроо்рокோродு роТро░ுрооுро▒ை роороЯ்роЯுроо் execute роЖроХுроо். // Eg: Pin-роР Output роЖроХ роЕрооைрод்родро▓் } void loop() { // setup() рооுроЯிрои்род рокிро▒роХு родொроЯро░்рои்родு (рооுроЯிро╡ிро▓்ро▓ாрооро▓்) repeat роЖроХுроо். // Eg: Sensor reading, LED ON/OFF }
ЁЯТб 6. Practical App 1: LED ON/OFF (Blinking) ▼

Logic

Set LED pin as OUTPUT → LED ON → Wait → LED OFF → Wait → Repeat

Arduino Code

int ledPin = 13; void setup() { pinMode(ledPin, OUTPUT); // Pin-роР output роЖроХ роЕрооைроХ்роХிро▒родு } void loop() { digitalWrite(ledPin, HIGH); // LED ON delay(1000); // 1 second (1000ms) роХாрод்родிро░ுроХ்роХிро▒родு digitalWrite(ledPin, LOW); // LED OFF delay(1000); // 1 second роХாрод்родிро░ுроХ்роХிро▒родு }
ЁЯМЧ 7. Practical App 2: Automatic Light (LDR) ▼
LDR (Light Dependent Resistor): роТро│ிропிрой் intensity-роХ்роХு роПро▒்рок resistance рооாро▒ுроо் component. роЗродு Analog Input-роХ்роХு роЕройுрок்рокрок்рокроЯுроо்.

Algorithm / Pseudocode

START Read light intensity (from LDR) IF light intensity < threshold (Eg: 400) LED = ON (роЗро░ுроЯ்роЯு) ELSE LED = OFF (ро╡ெро│ிроЪ்роЪроо்) REPEAT
⭐ Exam Logic Question:
"Design a system that switches an LED ON when the ambient light intensity becomes low."

Answer Structure:
Input: LDR → Processing: Microcontroller → Decision: Compare with threshold → Output: LED
ЁЯМб️ 8. Practical App 3: Temperature Sensor + Fan ▼

Pseudocode

START temperature = READ SENSOR IF temperature > 30 TURN FAN ON ELSE TURN FAN OFF REPEAT

⚠️ рооுроХ்роХிроп роХுро▒ிрок்рокு (Driver/Relay)

рокெро░ிроп Fan/Motor-роР Arduino I/O pin-роХ்роХு роиேро░роЯிропாроХ роЗрогைроХ்роХроХ் роХூроЯாродு. Microcontroller pin роХுро▒ைрои்род current-роР роороЯ்роЯுрооே ро╡ро┤роЩ்роХுроо். роОройро╡ே Driver circuit / Relay / Transistor рооро▒்ро▒ுроо் родройி Power Supply родேро╡ைрок்рокроЯுроо்.

ЁЯЪк 9. Practical App 4: Door Detection (Reed Switch) ▼

Reed Switch: Magnetic field рооூро▓роо் open/close роЖроХுроо் switch. роХродро╡ிро▓் Magnet-роРропுроо், Door Frame-ро▓் Reed Switch-роРропுроо் рокொро░ுрод்родுро╡ோроо்.

Logic

  • Door Closed → Magnet роЕро░ுроХிро▓் роЙро│்ро│родு → LED OFF / Buzzer OFF
  • Door Open → Magnet ро╡ிро▓роХுроХிро▒родு → LED ON / Buzzer ON (Alarm)

Pseudocode

START Read reed switch (Digital Input) IF door is open Turn ON Alarm / LED ELSE Turn OFF Alarm / LED REPEAT
ЁЯПЖ 10. Master Summary (Input → Process → Output) ▼

роЗрои்род competency-ропிрой் рооிроХ рооுроХ்роХிропрооாрой Concept-роР роЗрои்род роЕроЯ்роЯро╡рогைропிро▓் рооройрок்рокாроЯроо் роЪெроп்ропுроЩ்роХро│்:

Application Input (Sensor) Processing Output
LED Control Switch / Program Microcontroller LED
Automatic Light LDR (Analog) Microcontroller LED / Bulb
Automatic Fan Temperature Sensor Microcontroller Fan (via Relay)
Door Detection Reed Switch (Digital) Microcontroller LED / Buzzer
ЁЯОУ SRI LANKA ONLINE ICT TRAINING

Expert ICT, Computer Science, Coding & Digital Marketing Classes

Learn ICT, Computer Science, Programming, Web Development and Digital Marketing with practical, career-focused guidance.

ЁЯТм Join WhatsApp ▶ Watch Tutorials

ЁЯЪА Learn Today. Build Tomorrow.

Welcome to our Sri Lanka Online ICT & Computer Classes community! We provide Online Tuition Classes, Home Visit Classes and Individual / Group Classes for students and professionals. Whether you are a school student, university student, beginner programmer or entrepreneur, we help you develop practical IT skills for education and career growth.

ЁЯТб Explore Our Training & Services

ЁЯОУ University Project Guidance

Technical guidance for university assignments and final-year IT projects.

  • BIT / BSc / IT / ICT Projects
  • Final Year Project Guidance
  • PHP & MySQL Projects
  • Python & Java Projects
  • Database & Web Applications
  • Project Ideas & Documentation

ЁЯдЦ AI, Coding & Software

Develop programming knowledge and practical software development skills.

  • Python Programming
  • C & Java Programming
  • PHP & JavaScript
  • HTML & CSS
  • jQuery & AJAX
  • AI & Smart Applications

ЁЯПл School ICT Classes

Interactive ICT and Computer Science lessons for school students.

  • Grade 1 – Grade 11
  • G.C.E. O/L ICT
  • G.C.E. A/L ICT
  • GIT Classes
  • School ICT & Internal Tests
  • Past Papers & Revision

ЁЯМР Web Design & Development

Build websites and database-driven applications for individuals and businesses.

  • Website Design
  • Website Development
  • WordPress Development
  • PHP & MySQL
  • HTML / CSS / JavaScript
  • Website SEO & Maintenance

ЁЯУв Digital Marketing

Grow your brand online with social media and digital marketing support.

  • Digital Marketing
  • Facebook Page Management
  • Instagram Marketing
  • TikTok & YouTube
  • Content Creation & SEO
  • Facebook Ads & Reels

ЁЯТ╗ Computer & IT Skills

Build essential computer skills from absolute beginner to advanced level.

  • Computer Fundamentals
  • MS Word, Excel & PowerPoint
  • Excel Formulas & Macros
  • Oracle / MySQL / MS SQL
  • AWS, Linux & DevOps
  • Freelancing & IT Skills

ЁЯУЪ Learn With Your Curriculum

Support for Sri Lankan Local Curriculum, Cambridge and Pearson Edexcel programs.

ЁЯЗ▒ЁЯЗ░ Sri Lankan Local Curriculum

  • Grade 01 – Grade 11 ICT
  • G.C.E. O/L ICT
  • G.C.E. A/L ICT
  • GIT Classes
  • Term Test Preparation
  • Model Papers & Notes
  • English / Sinhala / Tamil Medium

ЁЯУШ Pearson Edexcel

  • iPrimary Computing
  • iLowerSecondary Computing
  • International GCSE ICT
  • International GCSE Computer Science
  • GCSE Computer Science
  • International A Level IT
  • International A Level Computer Science

ЁЯУЧ Cambridge Curriculum

  • Cambridge Primary Computing
  • Cambridge Lower Secondary Computing
  • Cambridge IGCSE ICT
  • Cambridge IGCSE Computer Science
  • Cambridge O Level Computer Science
  • AS & A Level IT
  • AS & A Level Computer Science

ЁЯТ╗ Programming & Software Development

ЁЯЫа️ Programming Languages & Technologies

✅ Python Programming ✅ C Programming ✅ Java Programming
✅ PHP Programming ✅ JavaScript ✅ HTML & CSS
✅ jQuery & AJAX ✅ ASP.NET ✅ VB.NET
✅ VB6 ✅ MySQL ✅ MS SQL Server
✅ MS Access ✅ Oracle Database ✅ Database Design
✅ SQL Queries ✅ Database Programming ✅ Software Development

ЁЯМР Web Design & Development

  • ✅ Website Design
  • ✅ Website Development
  • ✅ WordPress Website Development
  • ✅ HTML / CSS / JavaScript
  • ✅ PHP & MySQL
  • ✅ WordPress SEO
  • ✅ Website Maintenance
  • ✅ Web Applications
  • ✅ Database-Driven Websites

ЁЯОУ University & Final Year IT Projects

ЁЯзС‍ЁЯТ╗ Project Development

  • BIT / BSc / IT / ICT Projects
  • PHP & MySQL Projects
  • Python Projects
  • Java Projects
  • Web Application Projects
  • Database Projects

ЁЯУД Documentation & Practical

  • Project Ideas
  • System Architecture
  • Database Design
  • Assignments Guidance
  • Practical Implementation
  • Technical Documentation

ЁЯза AI & Smart Applications

  • AI Application Concepts
  • Machine Learning Modules
  • Automation Applications
  • Step-by-Step Coding
  • System Implementation
  • Project Learning Support

ЁЯУК Database, Cloud & IT Training

✅ Oracle Database ✅ MySQL ✅ Microsoft SQL Server
✅ Microsoft Access ✅ Database Design ✅ SQL Queries
✅ AWS Cloud ✅ Linux ✅ UNIX
✅ Windows Server ✅ DevOps ✅ SRE
✅ Automation ✅ Software Testing ✅ Freelancing Skills

ЁЯУ▒ Digital Marketing & Social Media

✅ Digital Marketing ✅ Facebook Page Setup & Management
✅ Instagram Marketing ✅ TikTok Marketing
✅ YouTube Channel Setup ✅ Social Media Management
✅ Content Creation ✅ SEO
✅ Facebook Ads ✅ Instagram Reels
✅ LinkedIn Branding ✅ Social Media Campaign Planning
✅ Hashtag Strategy ✅ Insights & Engagement

ЁЯЦе️ Microsoft Office & Digital Skills

  • ✅ MS Word
  • ✅ MS Excel
  • ✅ MS PowerPoint
  • ✅ Excel Formulas
  • ✅ Excel Automation & Macros
  • ✅ Computer Fundamentals
  • ✅ Digital Literacy
  • ✅ Multimedia Presentations

⭐ Why Join Our Classes?

ЁЯМН
Online & Home Visit Classes
ЁЯСе
Individual & Group Classes
ЁЯЧг️
English / Sinhala / Tamil
ЁЯУЪ
School & University Support
ЁЯУЭ
Past Papers & Model Papers
ЁЯТ╗
Practical Programming
ЁЯЪА
Beginner to Advanced Skills
ЁЯОп
Career-Focused Learning

ЁЯУЮ Ready to Start Learning?

Book your online class or contact us for ICT training, programming courses, university project guidance and digital marketing services.

ЁЯУ▒ Call / WhatsApp: +94 729622034

ЁЯУз Email: itclasssl@gmail.com

ЁЯТ╗ Skype: ITClassSL

ЁЯТм Contact Us on WhatsApp

ЁЯМР Our Online Learning Platforms

Explore tutorials, notes, project guides and learning resources.

ЁЯУ║ YouTube Tutorials
Watch ICT & programming videos
ЁЯТм WhatsApp Community
Join our learning community
✍️ ICT Blog
Computer classes and tutorials
ЁЯУ░ WordPress
Notes and learning resources
ЁЯУШ Facebook
Follow our official page
ЁЯМР Wix Website
Explore our training services
ЁЯТ╗ eTeacher Website
Online learning platform
ЁЯУЭ Medium
Read technology articles
❓ Quora
Project guidance and Q&A
ЁЯОУ Strikingly Portfolio
University project resources
ЁЯЧг️ ElaKiri Forum
Join the project discussion
ЁЯО╡ TikTok
Follow our learning videos
ЁЯЫТ Payhip
Explore our digital resources
ЁЯМР Weebly
Project and IT resources

ITClassSL — ICT Training | Computer Classes | Programming | University Project Guidance | Digital Marketing

Learn • Practice • Build • Grow ЁЯЪА

Monday, October 5, 2026

Java Class 1 notes computer science university programming basics, JDK/JRE/JVM, variables, data types, operators, type casting, Scanner input, and practical exercises with solutions

☕ Java Fundamentals & Program Development

Class 1 Complete Notes | From Basics to Mini Project

ЁЯУЪ About this guide: Complete, exam-friendly notes for Java Class 1: Fundamentals & Program Development. Covers Programming Basics, JDK/JRE/JVM, Variables, Data Types, Operators, Scanner Input, Type Casting, and Practical Exercises with step-by-step code explanations.
1.1 - 1.3

Programming, Algorithms & Source Code

  • Programming: Writing instructions that tell a computer how to perform a task.
  • Algorithm: A step-by-step, language-independent procedure to solve a problem (like a recipe idea).
  • Program: The implementation of an algorithm in a specific language (like the recipe written in English).
  • Source Code: Human-readable text written by the programmer (saved as .java files).
1.4 - 1.5

Compiler, JDK, JRE & JVM

ComponentContainsUsed For
JVMBytecode interpreterExecuting bytecode ("Write Once, Run Anywhere")
JREJVM + LibrariesRunning Java programs
JDKJRE + Compiler (javac) + ToolsDeveloping and compiling programs

Flow: Main.java → (javac) → Main.class (bytecode) → (JVM) → Output

1.7 - 1.8

Syntax vs Semantics & Types of Errors

  • Syntax: Grammar rules of the language (e.g., missing semicolon).
  • Semantics: The actual meaning/logic of the code (e.g., wrong formula).
Error TypeDetected WhenExample
SyntaxCompile timeMissing ; or invalid variable name
RuntimeWhile runningDividing by zero (ArithmeticException)
LogicalChecking outputWrong formula (Compiles & runs, but gives wrong answer)
2.1

GUI vs CLI

  • GUI (Graphical User Interface): Interact using windows, icons, menus, and a mouse. (Easy for beginners).
  • CLI (Command Line Interface): Interact by typing text commands into a terminal. (Faster for developers, used for compiling/running).
2.3

Text Editors vs IDEs

FeatureText Editor (Notepad)IDE (IntelliJ, Eclipse)
Edit codeYesYes
Compile & RunManually via CLIBuilt-in button
Error detectionNoYes, live underlining
Auto-completeLimitedYes, smart suggestions
2.4

Popular Java IDEs

  • IntelliJ IDEA: Popular, smart code completion, very beginner-friendly (Community Edition is free).
  • Eclipse: Long-established, free, open-source, widely used in universities.
  • VS Code: Lightweight editor that becomes a Java IDE after installing the Java Extension Pack.
3.0

Hello World Program

public class Main {
    public static void main(String[] args) {
        System.out.println("Hello World");
    }
}
4.0

Line-by-Line Breakdown

  • public class Main: All Java code must be inside a class. If public, file name must match (Main.java).
  • public static void main(String[] args): The entry point. public (accessible anywhere), static (runs without creating an object), void (returns nothing), String[] args (command-line arguments).
  • System.out.println(): Prints text to the console and moves to a new line. (Use print() to stay on the same line).
ЁЯОп Golden Rules: Every statement ends with ; | Java is case-sensitive | Blocks use {} | Text uses ""
5.1

Variables & Naming Rules

A variable is a named memory location that stores a value. Java is statically typed (must declare type).

Syntax: dataType variableName = value;

Rules: Can contain letters, digits, _, $. Cannot start with a digit. Cannot be a keyword. Use camelCase by convention.

5.2

Primitive vs Reference Data Types

TypeStoresSizeExample
intWhole numbers4 bytesint age = 25;
doubleDecimals (15 digits precision)8 bytesdouble price = 99.75;
floatDecimals (7 digits precision)4 bytesfloat temp = 36.5f; (Needs f)
charSingle character2 byteschar grade = 'A'; (Single quotes)
booleantrue or false1 bitboolean pass = true;
StringText (Class, not primitive)VariesString name = "Ali"; (Double quotes)
5.3

Constants (final keyword)

A constant's value cannot be changed after assignment. Use the final keyword. Convention: UPPERCASE_WITH_UNDERSCORES.

final double PI = 3.14159;
final int MAX_MARKS = 100;
// PI = 3.14;  ERROR: cannot assign a value to final variable
6.0

Getting User Input (Scanner)

import java.util.Scanner; // 1. Import

public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in); // 2. Create object
        
        System.out.print("Enter your age: ");
        int age = input.nextInt(); // 3. Read input
        
        System.out.println("You are " + age + " years old.");
        input.close();
    }
}
⚠️ Common Pitfall: After nextInt(), the Enter key (newline) stays in the buffer. If you use nextLine() next, it will read an empty string. Fix: Add an extra input.nextLine(); to consume the leftover newline.
7.0

Arithmetic, Relational & Logical Operators

  • Arithmetic: +, -, *, / (Integer division drops decimals!), % (Modulus/Remainder).
  • Relational: == (Equal), != (Not equal), >, <, >=, <=. (Returns boolean).
  • Logical: && (AND), || (OR), ! (NOT).
  • Increment/Decrement: x++ (post-increment: use then increase), ++x (pre-increment: increase then use).
8.2

Automatic Conversion (Widening)

Java automatically converts a smaller type to a larger type without data loss.

Order: byte → short → int → long → float → double

int a = 10;
double b = 3; // 3 becomes 3.0 automatically
double result = a / b; // 10.0 / 3.0 = 3.333...
8.3

Explicit Conversion (Narrowing / Casting)

Converting a larger type to a smaller type must be done manually using a cast. Data may be lost (decimals are truncated, not rounded).

double price = 99.99;
int rounded = (int) price; // 99 (decimal part is cut off)

// int x = 7.5; ERROR: possible lossy conversion
int y = (int) 7.5; // OK, y = 7
8.4

Casting to Fix Integer Division

If you divide two integers, Java performs integer division. Cast before dividing to get a decimal result.

int total = 17;
int count = 5;

double wrong = total / count; // 3.0 (Integer division happened first!)
double correct = (double) total / count; // 3.4 (Cast applied first)
Ex 1-4

Quick Exercise Formulas

  • Area of Circle: PI * radius * radius
  • Area of Rectangle: length * width
  • Simple Interest: (principal * rate * time) / 100
  • Celsius to Fahrenheit: (celsius * 9.0 / 5) + 32 (Use 9.0 to avoid integer division!)
Mini Project

Student Marks Calculator

Accepts name and 3 subject marks, then calculates total, average, and pass/fail result.

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        System.out.print("Enter student name: ");
        String name = input.nextLine();

        System.out.print("Enter marks for subject 1: ");
        int m1 = input.nextInt();
        System.out.print("Enter marks for subject 2: ");
        int m2 = input.nextInt();
        System.out.print("Enter marks for subject 3: ");
        int m3 = input.nextInt();

        int total = m1 + m2 + m3;
        double average = total / 3.0; // 3.0 forces decimal division

        // Ternary operator (short if/else)
        String result = (average >= 40) ? "Pass" : "Fail";

        System.out.println("\n------ Result Sheet------");
        System.out.println("Name   : " + name);
        System.out.println("Total  : " + total);
        System.out.printf("Average: %.2f%n", average); // 2 decimal places
        System.out.println("Result : " + result);

        input.close();
    }
}

ЁЯУМ Quick Revision Summary

⭐ Core Concepts:
ЁЯФД Flow: .java (Source) → javac → .class (Bytecode) → JVM → Output
ЁЯУж JDK ⊃ JRE ⊃ JVM
ЁЯРЫ Errors: Syntax (Compile), Runtime (Crash), Logical (Wrong Output)
ЁЯЪк Entry Point: public static void main(String[] args)
ЁЯФв Types: int, double, float, char, boolean, String
⌨️ Input: Scanner (import java.util.Scanner;)
➗ Division: int/int drops decimals. Cast to double or use .0!
ЁЯФД Casting: Widening (Auto, Safe) | Narrowing (Manual, Data Loss)

ЁЯУЭ Practice Questions

  • Q1: Differentiate between JDK, JRE and JVM.
  • Q2: What is the difference between a compile-time error and a logical error? Give one example of each.
  • Q3: Why is main declared static?
  • Q4: What is the output of System.out.println(7 / 2);? How would you get 3.5?
  • Q5: What is the value of x and y after int x = 5; int y = x++ + ++x;?
  • Q6: Write a program that reads a number of days and prints the equivalent number of weeks and remaining days (Hint: use / and %).

❓ Frequently Asked Questions (FAQ)

Q: What is the difference between JDK, JRE, and JVM? A: JVM (Java Virtual Machine) executes bytecode. JRE (Java Runtime Environment) includes the JVM and standard libraries needed to run programs. JDK (Java Development Kit) includes the JRE plus development tools like the compiler (javac) and debugger, which are needed to write and compile programs.
Q: What are the three types of errors in Java? A: 1. Syntax Errors: Violations of Java's grammar rules detected by the compiler (e.g., missing semicolon). 2. Runtime Errors: Illegal operations that crash the program while running (e.g., dividing by zero). 3. Logical Errors: The program runs without crashing but produces an incorrect result due to flawed logic.
Q: Why is the main method declared static in Java? A: The main method is declared static so that the JVM can call it directly using the class name without needing to create an object (instance) of the class first. This allows the program to start executing immediately.
Q: What is the difference between widening and narrowing in Java? A: Widening (Automatic Conversion) is when Java automatically converts a smaller data type to a larger one (e.g., int to double) without data loss. Narrowing (Explicit Casting) is when you manually convert a larger type to a smaller one (e.g., double to int) using a cast, which may result in data loss.
ЁЯОУ SRI LANKA ONLINE ICT TRAINING

Expert ICT, Computer Science, Coding & Digital Marketing Classes

Learn ICT, Computer Science, Programming, Web Development and Digital Marketing with practical, career-focused guidance.

ЁЯТм Join WhatsApp ▶ Watch Tutorials

ЁЯЪА Learn Today. Build Tomorrow.

Welcome to our Sri Lanka Online ICT & Computer Classes community! We provide Online Tuition Classes, Home Visit Classes and Individual / Group Classes for students and professionals. Whether you are a school student, university student, beginner programmer or entrepreneur, we help you develop practical IT skills for education and career growth.

ЁЯТб Explore Our Training & Services

ЁЯОУ University Project Guidance

Technical guidance for university assignments and final-year IT projects.

  • BIT / BSc / IT / ICT Projects
  • Final Year Project Guidance
  • PHP & MySQL Projects
  • Python & Java Projects
  • Database & Web Applications
  • Project Ideas & Documentation

ЁЯдЦ AI, Coding & Software

Develop programming knowledge and practical software development skills.

  • Python Programming
  • C & Java Programming
  • PHP & JavaScript
  • HTML & CSS
  • jQuery & AJAX
  • AI & Smart Applications

ЁЯПл School ICT Classes

Interactive ICT and Computer Science lessons for school students.

  • Grade 1 – Grade 11
  • G.C.E. O/L ICT
  • G.C.E. A/L ICT
  • GIT Classes
  • School ICT & Internal Tests
  • Past Papers & Revision

ЁЯМР Web Design & Development

Build websites and database-driven applications for individuals and businesses.

  • Website Design
  • Website Development
  • WordPress Development
  • PHP & MySQL
  • HTML / CSS / JavaScript
  • Website SEO & Maintenance

ЁЯУв Digital Marketing

Grow your brand online with social media and digital marketing support.

  • Digital Marketing
  • Facebook Page Management
  • Instagram Marketing
  • TikTok & YouTube
  • Content Creation & SEO
  • Facebook Ads & Reels

ЁЯТ╗ Computer & IT Skills

Build essential computer skills from absolute beginner to advanced level.

  • Computer Fundamentals
  • MS Word, Excel & PowerPoint
  • Excel Formulas & Macros
  • Oracle / MySQL / MS SQL
  • AWS, Linux & DevOps
  • Freelancing & IT Skills

ЁЯУЪ Learn With Your Curriculum

Support for Sri Lankan Local Curriculum, Cambridge and Pearson Edexcel programs.

ЁЯЗ▒ЁЯЗ░ Sri Lankan Local Curriculum

  • Grade 01 – Grade 11 ICT
  • G.C.E. O/L ICT
  • G.C.E. A/L ICT
  • GIT Classes
  • Term Test Preparation
  • Model Papers & Notes
  • English / Sinhala / Tamil Medium

ЁЯУШ Pearson Edexcel

  • iPrimary Computing
  • iLowerSecondary Computing
  • International GCSE ICT
  • International GCSE Computer Science
  • GCSE Computer Science
  • International A Level IT
  • International A Level Computer Science

ЁЯУЧ Cambridge Curriculum

  • Cambridge Primary Computing
  • Cambridge Lower Secondary Computing
  • Cambridge IGCSE ICT
  • Cambridge IGCSE Computer Science
  • Cambridge O Level Computer Science
  • AS & A Level IT
  • AS & A Level Computer Science

ЁЯТ╗ Programming & Software Development

ЁЯЫа️ Programming Languages & Technologies

✅ Python Programming ✅ C Programming ✅ Java Programming
✅ PHP Programming ✅ JavaScript ✅ HTML & CSS
✅ jQuery & AJAX ✅ ASP.NET ✅ VB.NET
✅ VB6 ✅ MySQL ✅ MS SQL Server
✅ MS Access ✅ Oracle Database ✅ Database Design
✅ SQL Queries ✅ Database Programming ✅ Software Development

ЁЯМР Web Design & Development

  • ✅ Website Design
  • ✅ Website Development
  • ✅ WordPress Website Development
  • ✅ HTML / CSS / JavaScript
  • ✅ PHP & MySQL
  • ✅ WordPress SEO
  • ✅ Website Maintenance
  • ✅ Web Applications
  • ✅ Database-Driven Websites

ЁЯОУ University & Final Year IT Projects

ЁЯзС‍ЁЯТ╗ Project Development

  • BIT / BSc / IT / ICT Projects
  • PHP & MySQL Projects
  • Python Projects
  • Java Projects
  • Web Application Projects
  • Database Projects

ЁЯУД Documentation & Practical

  • Project Ideas
  • System Architecture
  • Database Design
  • Assignments Guidance
  • Practical Implementation
  • Technical Documentation

ЁЯза AI & Smart Applications

  • AI Application Concepts
  • Machine Learning Modules
  • Automation Applications
  • Step-by-Step Coding
  • System Implementation
  • Project Learning Support

ЁЯУК Database, Cloud & IT Training

✅ Oracle Database ✅ MySQL ✅ Microsoft SQL Server
✅ Microsoft Access ✅ Database Design ✅ SQL Queries
✅ AWS Cloud ✅ Linux ✅ UNIX
✅ Windows Server ✅ DevOps ✅ SRE
✅ Automation ✅ Software Testing ✅ Freelancing Skills

ЁЯУ▒ Digital Marketing & Social Media

✅ Digital Marketing ✅ Facebook Page Setup & Management
✅ Instagram Marketing ✅ TikTok Marketing
✅ YouTube Channel Setup ✅ Social Media Management
✅ Content Creation ✅ SEO
✅ Facebook Ads ✅ Instagram Reels
✅ LinkedIn Branding ✅ Social Media Campaign Planning
✅ Hashtag Strategy ✅ Insights & Engagement

ЁЯЦе️ Microsoft Office & Digital Skills

  • ✅ MS Word
  • ✅ MS Excel
  • ✅ MS PowerPoint
  • ✅ Excel Formulas
  • ✅ Excel Automation & Macros
  • ✅ Computer Fundamentals
  • ✅ Digital Literacy
  • ✅ Multimedia Presentations

⭐ Why Join Our Classes?

ЁЯМН
Online & Home Visit Classes
ЁЯСе
Individual & Group Classes
ЁЯЧг️
English / Sinhala / Tamil
ЁЯУЪ
School & University Support
ЁЯУЭ
Past Papers & Model Papers
ЁЯТ╗
Practical Programming
ЁЯЪА
Beginner to Advanced Skills
ЁЯОп
Career-Focused Learning

ЁЯУЮ Ready to Start Learning?

Book your online class or contact us for ICT training, programming courses, university project guidance and digital marketing services.

ЁЯУ▒ Call / WhatsApp: +94 729622034

ЁЯУз Email: itclasssl@gmail.com

ЁЯТ╗ Skype: ITClassSL

ЁЯТм Contact Us on WhatsApp

ЁЯМР Our Online Learning Platforms

Explore tutorials, notes, project guides and learning resources.

ЁЯУ║ YouTube Tutorials
Watch ICT & programming videos
ЁЯТм WhatsApp Community
Join our learning community
✍️ ICT Blog
Computer classes and tutorials
ЁЯУ░ WordPress
Notes and learning resources
ЁЯУШ Facebook
Follow our official page
ЁЯМР Wix Website
Explore our training services
ЁЯТ╗ eTeacher Website
Online learning platform
ЁЯУЭ Medium
Read technology articles
❓ Quora
Project guidance and Q&A
ЁЯОУ Strikingly Portfolio
University project resources
ЁЯЧг️ ElaKiri Forum
Join the project discussion
ЁЯО╡ TikTok
Follow our learning videos
ЁЯЫТ Payhip
Explore our digital resources
ЁЯМР Weebly
Project and IT resources

ITClassSL — ICT Training | Computer Classes | Programming | University Project Guidance | Digital Marketing

Learn • Practice • Build • Grow ЁЯЪА