Summary
Highlights
The lecturer welcomes first-year engineering students and introduces the Computer Programming 1 course, focusing on the Java language. Java is described as a high-level language, close to human language and far from complex machine code (binary). Its key features include ease of reading and writing, use of understandable keywords (like 'if', 'for', 'switch'), and automatic memory management through 'garbage collection'. Java is also platform-independent, thanks to the Java Virtual Machine (JVM), allowing programs to run on various operating systems like Windows, Linux, Android, etc. It also offers built-in libraries for common tasks and enhanced security by preventing direct memory access.
A comparison is made between Java (high-level) and Assembly (low-level), highlighting Java's ease of understanding, human-like language, and simpler learning curve. The process of writing Java code involves writing source code (.java), compiling it into bytecode, and then running it using the Java Virtual Machine. The course will cover topics similar to C programming, such as 'if' statements, 'switch' statements, loops, and arrays, but implemented in Java. New concepts like basic printing and object-oriented programming (OOP), including classes and objects, will also be introduced. Java is an object-oriented programming language, used for creating various applications like desktop programs, Android apps, and web applications. It was developed by Sun Microsystems (now Oracle) in 1995.
The video explains the Java development workflow: a programmer writes code in a text editor (e.g., Notepad) saving it as a '.java' file. This code is then translated by a compiler (Java C or Javac) into bytecode. This bytecode is then executed by the Java Virtual Machine (JVM), allowing the program to run on any operating system. Key concepts discussed include classes, objects, variables, and methods. The Java Development Kit (JDK) is introduced as a complete set of tools for developing and running Java programs, including the Java compiler. Various Integrated Development Environments (IDEs) like Eclipse, NetBeans, JGrasp, and BlueJ are mentioned as tools to simplify coding and debugging. JDK exists in many versions, with the latest being 25.
The Java Runtime Environment (JRE) is defined as the environment necessary to run Java programs. Without JRE, no Java application can execute. JRE comprises two main parts: the Java Virtual Machine (JVM) for executing bytecode and converting it into machine-understandable code, and essential libraries for common functions like printing and input/output operations. The lecture reiterates the full development cycle: programmer writes code -> Java Compiler creates bytecode -> JRE (JVM + Libraries) executes the bytecode and displays the result.
A practical demonstration begins with installing JDK (version 8 is recommended for this course) and JGrasp IDE (version 5). The process of creating a new Java file, naming it (e.g., 'test.java'), and assigning a class name (e.g., Public Class Test) is shown. The basic structure of a Java program with a main method is explained, and the `System.out.println()` command for printing output is introduced. The importance of semicolons at the end of statements and commenting code using `//` or `/* */` is highlighted. The compilation and execution process in JGrasp is demonstrated, showing how to check for errors and run the program to display its output. Troubleshooting tips are provided, such as configuring the JDK path in JGrasp and adjusting font size.
The lecturer emphasizes the importance of hands-on practice in programming, encouraging students to apply theoretical knowledge immediately. For students without laptops, mobile applications like 'Java Compile' are suggested as alternatives. Due to current circumstances (war and lack of labs), students will receive practical manuals and support through Telegram or WhatsApp groups. The course will also include a final project to consolidate all learned concepts.