Skip to content
โ† Back to Overview

TVL โ€” Java Programming

Senior High TVL/ICT reviewer: Java syntax, control structures, and OOP.

Reviewer for Java Programming under the TVL-ICT track.

1

Syntax & Data Types

TypeHoldsExample
intwhole numbersint x = 5;
doubledecimalsdouble y = 3.14;
booleantrue/falseboolean ok = true;
StringtextString s = "Hi";
โš ๏ธ Common Mistake

Java is case-sensitive and every statement ends with a semicolon (;).

2

Control Structures

Use if/else for decisions and for/while for loops.

for (int i = 0; i < 5; i++) { System.out.println(i); }
3

Object-Oriented Programming

Java is OOP-based. Core pillars: Encapsulation, Inheritance, Polymorphism, Abstraction. A class is a blueprint; an object is an instance.

๐Ÿ’ก Exam Hack

Remember the four pillars as "A PIE": Abstraction, Polymorphism, Inheritance, Encapsulation.

4

Worked Example

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

Every Java program starts running from the main method.

๐Ÿ“Œ Quick Recap โ€” Master These

Before your exam, make sure you can confidently explain and apply each of the following:

  • Syntax & Data Types
  • Control Structures
  • Object-Oriented Programming
  • Worked Example

Re-read any section above where you hesitate.