Java Programming Fundamentals

System.out.println

  • System.out.println() is a method used to print output in Java.
  • It outputs the text or variable that is passed to it, followed by a new line.
  • It is often used to display the results of a program or to debug code.

Java Development Kit (JDK) and IntelliJ IDEA Installation

  • JDK is required to develop Java programs.
  • IntelliJ IDEA is an integrated development environment (IDE) for Java that can be used to write, test, and debug code.
  • To install JDK and IntelliJ IDEA, follow the instructions provided by the respective vendors.

Java Compiled Language vs. Interpreted Language

  • Java is a compiled language, meaning that the source code is translated into machine code before it is executed.
  • This allows for faster execution and better performance compared to interpreted languages.
  • However, the compilation process can add an extra step to the development workflow.

Introduction to Java: An Object-Oriented Language

  • Java is an object-oriented programming language, which means that it uses objects to represent real-world concepts.
  • Objects have properties (data) and methods (behavior) that describe their characteristics and actions.
  • Object-oriented programming allows for modular, reusable code that is easier to maintain and extend.

JDK vs. JRE: Explained

  • JDK stands for Java Development Kit, and it includes the tools needed to develop Java applications.
  • JRE stands for Java Runtime Environment, and it includes the components needed to run Java applications.
  • JDK includes JRE, but JRE does not include JDK.

Creating Your First Java Program in IntelliJ IDEA

  • To create a new Java program in IntelliJ IDEA, select “Create New Project” from the welcome screen.
  • Choose “Java” as the project type and click “Next”.
  • Give your project a name and click “Finish”.
  • In the editor, enter a valid Java class with a main method.
  • Save the file and run the program by clicking the green “play” button.

Java Development Environment Setup

  • In order to start developing in Java, the following steps should be taken:
    1. Install JDK.
    2. Install an IDE (such as IntelliJ IDEA).
    3. Create a new Java project.
    4. Write and run your first Java program.