Back to all lessons


Lesson 1

Hello world, literals

Getting started with Java programming

Task 0

Find binary representation for numbers: 10, 19, 45.

Calculate value of: 10 & 19, 19 | 45.

Task 1

Find all mistakes in flowcharts below:

Flowcharts with errors
Task 2

This is a starter code (Hello.java):


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

Hello world!

Task 3

Compile your first java program:

Flowcharts with errors
Task 4

Write a program, that displays your name.

Task 5

Write a program, that adds two numbers. Try also multiplication, substracting and dividing.

Does dividing 11 per 2 give correct answer?

Task 6

Check your Task 0 writing java code.


public class Hello {
    public static void main(String[] args) {
        System.out.println(0b10101);
        System.out.println(0b10101 & 10);
        System.out.println(5 | 4);
    }
}