Lesson 1

Introduction to Java environment and lab tools.

Objectives

  • Creating and running first java program
  • Working with git

Documentation

Exercises

Exercise 1

  • Create a bitbucket git account;
  • Create a private repository using the naming conventions from “Regulament”.
  • From bitbucket web interface add a readme file to your repository;
  • Clone repository on the local computer:
git clone https://bitbucket.org/{replace-with-your}.git 
  • Add user will be received in class as a repository user with read access rights to your repository.

Exercise 2

  • Open repository location in command line and add a new folder 'lab1';
  • Add a new file 'description.txt' in folder lab1 and add some text in it;
  • Add changes to local repository;
  • Push changes to remote repository;
git add . 
git commit -m "Some comment."
git push

Exercise 3

Open an IDE (NetBeans, Eclipse of Intellij) and create a new project. Set as root folder for the project folder lab1 created in previous exercise.

Add a main class in the project and execute it.

Note When

package popescu.adrian.lab1.ex3;
 
public class HelloWorld {
 
    public static void main(String[] args) {
        // Prints "Hello, World" to the terminal window.
        System.out.println("Hello, World");
    }
 
}

Exercise 4

  1. Save changes to local repository
  2. Push changes to remote repository