4.1 Introduction

Hello Welcome to this section in which we will discuss four very important concepts in Java. We are not going to expression of code block declaration and method. These four components are really the key to Java. The purpose of this session is to make you understand this four principle. Without further delay let’s open our intellji IDE First of all, what a keyword is a keyword these are mits book in java we have 50 keywords We were able to use them in the course preceding Des mots-Keys like int How to Stream or String One cannot use one of its keywords to identify a variable a class name or method. Let’s take an example. Declare an int variable. Let’s call m Equals 1000. And a second int variable called We see that the second declaration is an error. Because the name of the variable And a word reserved in Java we can not use a keyword to identify a variable Let’s now talk about the expressions in java we use them a lot . They are built with values of variables of operations and also methods. Let’s go back to our example with keywords. We declare a variable m that is equal to 1000 Here our expression is limited by the semicolon. And Starts at the name of the variable, that is, m equals 1000 As I explained earlier. The expression is constructed with values of variables. But also methods that we will see After the course Let’s take another example declare a variable. int What we will call i that will be equal to . 1000 Times m Here have an operation The limit of our expression . And in semicolon and starts for the variable name. That is to say i equals 1000 * m Here we see another expression with an if M equals 1000 On affiche. True Here our expression is limited by if parentheses. Is the keyword and an inside parentheses We have our expression. If we start in our PrintLn is a method within parentheses. We have our expression. In the next course we go to declarations, spaces and indentations